A pharmacist accused of distributing painkillers online to customers who had not received in-person medical consultations has agreed to forfeit $2 million to the federal government as part of a plea deal his company struck with the U.S. Attorney’s Office in New Orleans.

The software company, eCareMD, pleaded guilty in federal court last week to one count of conspiracy to distribute Fioricet, a medication to treat tension headaches. The pharmacist, John A. McKinney, of Moss Point, Mississippi, signed the plea agreement as the company’s sole manager.

The case was brought in the Eastern District of Louisiana because many of the prescriptions were distributed in the New Orleans area, said Anna Christman, a spokeswoman for U.S. Attorney Kenneth Polite Jr.

McKinney’s attorney, Rick Simmons, said McKinney, after years of running a regular pharmacy business, “made an ill-advised venture into Internet sales with others of Fioricet.”

“He later withdrew from the operation,” Simmons added, “and there will be no individual criminal charges against him.”

McKinney will forfeit $2 million — the amount made from the illegal sales of Fioricet — along with his company’s software, Simmons said.

The plea agreement says the drug scheme played out over about a decade.

McKinney was approached in 2005 by an unnamed businessman, who proposed that McKinney and another, unnamed pharmacist “sign up as an affiliate pharmacy to fill and ship online prescription drug orders on behalf of certain Internet pharmacies,” court documents say.

The online pharmacies advertised the sale of prescription drugs, including the controlled substance Fioricet. Customers would choose a drug and the quantity they wanted to order, then fill out an online questionnaire explaining their symptoms and medical history.

That information would be used to generate an electronic prescription that would be signed by an affiliate doctor, sent to a “brick-and-mortar” pharmacy and shipped to the address given by the customer.

“No in-person medical consultations or examinations would be performed before or after the putative prescription was generated,” court documents say.

A federal law known as the Ryan Haight Act forbids “offering to fill a prescription for a controlled substance based solely on a consumer’s completion of an online medical questionnaire.” That law, passed in 2008, was named for an 18-year-old who overdosed on a painkiller he ordered online from a doctor he hadn’t consulted in person.

McKinney and his wife received a distinguished service award in 2013 from the University of Mississippi School of Pharmacy, which recognized the couple for providing care and medication to residents along the Gulf Coast in the wake of Hurricane Katrina.

Follow Jim Mustian on Twitter, @JimMustian.