The maker of opioid painkiller Opana ER is pulling the drug off the market at the request of federal regulators because it's being abused.

Endo International PLC said Thursday it will voluntarily stop selling the pills, approved for use in patients with severe, constant pain, after consulting with the U.S. Food and Drug Administration. It's the first opioid drug that the FDA has sought to remove from the market due to abuse.

The drugmaker said in a statement that the extended-release opioid is safe and effective when used as intended, and that Endo still believes Opana ER's benefits outweigh its risks.

Get Breaking News Delivered to Your Inbox

But last month, the FDA said it had concluded the drug is too risky. The agency said it had seen a "significant shift" from people crushing and snorting the pill to get high to injecting it instead.

Besides contributing to overdoses, abuse of Opana ER was blamed for a 2015 outbreak of HIV and hepatitis C in southern Indiana linked to sharing needles, according to the FDA.

Opana ER got U.S. approval in 2006. In 2012, Endo changed the drug's formulation to try to make it harder to abuse. The FDA approved sales of the new version but refused to let Endo market it as abuse deterrent.

The agency asked the company to stop selling Opana ER after its advisers, reviewing its safety at a March hearing, voted 18-8 against keeping it on the market.

Dublin, Ireland-based Endo, which has U.S. headquarters in the Philadelphia suburb of Malvern, said it will work with the FDA to try to minimize disruption for patients, who will need to switch to alternative treatments.

Endo primarily makes generic medicines, as well as a number of brand-name specialty drugs. Endo reported that Opana ER last year posted net sales of $159 million. The company said it will take a pre-tax charge of about $20 million to write off the drug's remaining value.

As of June, there were no generic versions of the reformulated Opana ER on the market, according to the FDA, but two generics of earlier versions are on sale, called oxymorphone.

The agency said it would also review other opioid painkillers and could take further action.

U.S.-traded shares of Endo fell 1.9 percent to $11.17 Thursday, more than twice the rate of decline on a down day for the broader markets. When the FDA urged Endo to pull Opana ER on June 8, company shares plunged 13.4 percent.