A year after it raised more than $10 billion to build a new, larger facility in New Mexico, Teva announced Thursday that it had agreed to pay a $12.4 billion payment to settle allegations that it illegally charged a small company to manufacture a drug it had developed.

The company said it had paid a $7.3 billion settlement in June to settle charges that it improperly billed a company for research work on a new drug, Sovaldi.

The new settlement came after the company was found to have illegally billed the University of Arizona $500,000 to conduct a study of the drug, which was not funded by Teva.

Teva said it was the largest ever settlement in its history.

The Justice Department has said Teva and other makers of prescription drugs could face civil penalties of up to $1 billion for misleading the Medicare and Medicaid programs about the drug’s effectiveness.

The settlement, which the Justice Department called an “excellent result,” comes just a month after the Drug Enforcement Administration warned that Teva could face fines of up $1.6 billion for illegally marketing Sovaldi, a drug that is designed to fight a parasitic infection that can kill hundreds of thousands of Americans annually.

The agency said the company “misappropriated funds and illegally billed Medicare, Medicaid and the federal government for Sovaldi.”

“We will continue to hold Teva accountable for its actions,” the agency said in a statement.

The FDA also said it is reviewing the Teva settlement and will “continue to closely monitor” Teva’s compliance with the law.