A Greenfield couple has pleaded guilty in federal court to obtaining fentanyl in Massachusetts that they then brought into New Hampshire, both for their own use and to sell to others, according to court records.

Ira Weeks, 40, was sentenced Thursday to more than seven years in federal prison, according to a news release from the U.S. attorney’s office for New Hampshire.

His wife, Shelley Weeks, has been participating in a federal drug-court program. She was recently terminated from the program but can re-apply if she meets certain conditions, according to a court order filed Thursday.

Both pleaded to a charge of conspiracy to distribute fentanyl — Shelley Weeks in March 2019 and her husband in May of this year.

Law enforcement officers said they caught the couple buying fentanyl from a supplier in Methuen, Mass., on several occasions in December 2017.

On Dec. 7, 2017, Shelley Weeks called the supplier to order nine “fingers,” or 10-gram packets, and Ira Weeks drove to Methuen to pick them up, according to a plea agreement filed in Shelley Weeks’ case.

The Drug Enforcement Administration intercepted the calls, and N.H. State Police pulled Ira Weeks over and seized the drugs, according to the plea agreement. Ira Weeks told police that he and his wife sold fentanyl in the Greenfield area for $80 to $100 per gram, the agreement states.

After Ira Weeks was released on bail, according to the agreement, the DEA watched him buy drugs in Massachusetts three more times that month before the authorities arrested him again in late December.

Between the two stops, police seized more than 175 grams of fentanyl. Speaking to police, Ira Weeks estimated that he and Shelley Weeks had bought four to 10 fingers per week over the previous year, for a total that federal prosecutors estimated at more than two kilograms.

Prosecutors said Ira Weeks should be sentenced to nine years, based in part on the quantity of drugs the couple transported “both for distribution to a limited customer base and to feed their personal fentanyl addictions.”

Weeks’ lawyer argued for a sentence of five years 10 months. He said the couple, struggling with addiction, primarily sought drugs for their own use, not profit.

“They had the progression from a percocets prescription, following an injury, through heroin and fentanyl,” the attorney, Stanley W. Norkunas of Lowell, Mass., wrote in a sentencing memorandum to the court.

He wrote that they were “heavy, long term drug abusers” who went through about two fingers per day.

That was illustrated by the fact that they reached out to their supplier again right after Ira Weeks’ first arrest — and made several more purchases despite knowing the authorities were onto them, Norkunas wrote in a separate filing.

“The drive of the addiction,” he wrote, “comes close to the old phrase that insanity is doing the same task multiple times expecting a different result each time.”

Paul Cuno-Booth can be reached at 352-1234, extension 1409, or Follow him on Twitter @PCunoBoothKS