Facing thousands of lawsuits alleging it fueled the opioid addiction crisis, pharmaceutical manufacturer Endo International PLC (ENDP) announced Tuesday that it filed for chapter 11 bankruptcy protection in U.S. Bankruptcy Court in New York.

Endo's move came a day before a landmark ruling. A federal judge on Wednesday ordered retailers CVS, Walmart and Walgreens to pay $650.6 million to two Ohio counties in damages related to the opioid crisis.

Endo, domiciled in Ireland with its U.S. headquarters in Pennsylvania, faced debts totaling $8 billion. The company entered a restructuring support agreement with a debt-holder group, which offered $6 billion for Endo's assets and agreed to some liabilities.

This debt-holder group holds most of Endo's first lien debt and its bid "will be subject to higher or otherwise better offers," the company said. Endo also said this decision will help address "remaining opioid and other litigation related claims."

Endo's India-based subsidiaries are not a part of the bankruptcy proceedings. Endo expects to file similar proceedings in Canada, the U.K., and Australia.

CEO and President Blaise Coleman said the company's latest decisions will fix "the more than $8 billion of debt that has burdened our balance sheet and [establish] a pathway to closure . . . to the thousands of opioid-related and other lawsuits that the Company has been defending at an unsustainable cost."

Coleman said the decisions will help the company look towards the future in better shape. Endo also said secured creditors agreed to use "cash collateral" so the business can continue to work day-to-day.

By filing for bankruptcy, the company also halts all litigation against it, including those related to the opioid crisis. The lawsuits filed against Endo were by state and local governments in the U.S. and governments abroad.

Though the litigation will halt, the parties involved can still negotiate a global deal to end the opioid lawsuits, Bloomberg noted. Following Endo's bankruptcy filing, Massachusetts Attorney General Maura Healey's officials agreed to settle for $450 million.

The agreement affects not only Endo but also the company's lenders. It also bans the promotion of Endo's opioids, including Percocet.

Endo is not the only pharma company to file for bankruptcy protection amid a slew of opioid lawsuits. Purdue and Mallinckrodt also used similar court protections to finish working out settlements.

As of Wednesday at 2:58 p.m ET, shares of Endo were trading at $0.3211, down $0.0489, or 13.22%.

Bottles of prescription painkiller OxyContin, 40mg pills, made by Purdue Pharma L.D. sit on a shelf at a local pharmacy, in Provo, Utah, U.S., April 25, 2017.
Bottles of prescription painkiller OxyContin, 40mg pills, made by Purdue Pharma L.D. sit on a shelf at a local pharmacy, in Provo, Utah, U.S., April 25, 2017. Reuters / George Frey