As dozens of potential jurors waited outside a Riverhead courtroom door, a Centereach property manager admitted Monday that he strangled his wife and bashed her in the head.

Joseph Jones, 34, interrupted jury selection to plead guilty to first-degree manslaughter in the death of Nicole Tessa, 31. Jones had been charged with second-degree murder and faced a maximum of 25 years to life in prison, but under the terms of the plea deal, Suffolk County Court Judge John Toomey Jr. agreed to sentence Jones to 18 1⁄2 years in prison on May 11.

Prosecutors have said before that Jones and Tessa were both addicted to pain pills and were dealing them to support their habits. They had said the couple argued after he stole oxycodone pills from her.

Only Tessa had a prescription for the pills, prosecutors have said.

After defense attorney George Duncan of Central Islip, negotiated the deal with Assistant District Attorney Peter Timmons, Duncan explained it to his client in court. Jones sighed heavily and then agreed to take the plea offer.

During questioning by Timmons, Jones said he and Tessa had been married for a few months and were living in North Patchogue on Dec. 17, 2010. After 11 p.m., Jones said he and his wife argued outside their home. Timmons did not ask what the argument was about.

advertisement | advertise on newsday

Jones began to cry, saying they continued arguing as they walked down the street and began to fight physically. He ended up strangling her and hitting her in the head with something, he said.

“What was it? A rock?” Timmons asked.

“I don’t remember,” Jones said, sniffling.

Shortly afterward, he said he dragged her body into the woods and buried her in a shallow grave.

“Plea negotiations were ongoing right up through jury selection,” Duncan said afterward. “Through hard work on both sides, we reached an agreement that met with the satisfaction of the district attorney’s office and my client.”

In the days after Tessa disappeared, prosecutors have said Jones told people that he didn’t know where she was and was worried because she had left without her anti-seizure medicine. He said then that one or both of them would storm off after their frequent arguments, but that they always calmed down and made up.

Prosecutors said Tessa’s pills were prescribed by Dr. Michael Randall of Setauket, who was charged in 2014 with prescribing painkillers “without a medical purpose.”

Randall pleaded guilty in federal court and was sentenced last year to 32 months in prison.