Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Two former officials of an Alabama compounding pharmacy have agreed to plead guilty to violating federal drug laws in preparing liquid nutrition tied to nine deaths, according to court documents filed Thursday.

David Allen and William Timothy Rogers, of a now defunct compounding pharmacy called Meds IV, were charged with preparing a contaminated intravenous drug, Total Parenteral Nutrition, which was intended to be given to patients who could not receive their nutrition through eating.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Federal prosecutors said that nine patients at Birmingham area hospitals developed bloodstream infections in 2011 after receiving the drug and died.

"While a number of the patients who died had underlying conditions which may have contributed to their deaths, medical records of some patients suggest" that the blood infections tied to the tainted drug "were also a significant factor," according to court documents.

A component of the drug was prepared outside the normal workbench and kept unrefrigerated in a room that was not sterile, in a large pot on the floor, before it was sterilized and used, the Justice Department said. That allowed a bacteria to develop which is resistant to many antibiotics.

Court documents said Allen and Rogers have agreed to plead guilty to two violations of federal drug laws. Both are misdemeanors, punishable by up to a year in prison.

"Because of unsanitary procedures in the mixing of liquid nutrition, contaminated IV fluid was sent to Birmingham area hospitals, and a number of patients developed serious bloodstream infections," said Joyce White, the U.S. Attorney in Birmingham.

A judge will schedule a hearing at which the two will enter their guilty pleas.