The owner of two New York City pharmacies and her husband pleaded guilty on Thursday to charges arising out of their roles in what authorities have called one of the largest opioid painkiller diversion schemes ever uncovered in the city.

Lilian Jakacki, the pharmacies' owner, and Marcin Jakacki, her husband, entered their pleas in Manhattan federal court, nine months after authorities arrested them amid efforts to combat the nation's heroin and opioid drug epidemic.

Both Jakackis, along with two corporate entities, pleaded guilty to conspiracy to distribute narcotics. Lilian Jakacki, 50, also pleaded guilty to conspiracy to commit health care fraud and conspiracy to commit money laundering.

Prosecutors had accused the Jakackis of illegally distributing more than 500,000 pills of oxycodone, a heavily-regulated painkiller that has enormous cash value to drug dealers and is abused by over 13 million Americans annually.

They ran the scheme out of two pharmacies in the boroughs of Brooklyn and Queens called Chopin Chemists from 2010 to 2015, prosecutors said. They illegally distributed pills with a street value of $10 million to $15 million.

During the scheme, the Brooklyn pharmacy for three years became the leading purchaser of oxycodone tablets in its ZIP code, which included two national chain stores, the indictment said.

They used the proceeds of the scheme to, among other things, buy a $2 million home in Greenwich, Connecticut, prosecutors said.

An audit in 2013 by the U.S. Drug Enforcement Administration found the Brooklyn pharmacy dispensed 430,000 pills without prescriptions, authorities said.

Prosecutors said another 160,000 pills were diverted based on 1,300 fraudulent prescriptions, including ones in the name of luxury brands like "Chanel" or "Coach."

Thursday's proceedings came a day after a guilty plea in the case was entered by Robert Cybulski, a Staten Island resident who prosecutors said was one of the largest pill purchasers.

In court, Marcin Jakacki, 36, admitted to illegally selling 20,000 pills.

Lilian Jakacki in her plea did not specify a number, but her plea agreement reflected the offense involved the equivalent of 100,000 30-milligram pills, according to a spokesman for Manhattan U.S. Attorney Preet Bharara.