Perhaps only in the strange business of pharmaceuticals would a company sue to have a federal agency declare that one of its products was unsafe and then be disappointed when it lost the suit.

But that's what happened with Endo Pharmaceuticals Inc., a subsidiary of Endo Health Solutions Inc., of Chadds Ford.

The drug in question is Opana ER, first approved by the U.S. Food and Drug Administration in 2006. It is an opioid painkiller, a group of medicines that are controversial because of deadly overdoses by abusers.

The Centers for Disease Control and Prevention recently said misuse of prescription painkillers was a "deadly epidemic" and caused more deaths by overdose than cocaine and heroin combined. Some addicts reportedly cut or crushed the drug and snorted or smoked it.

With officials from several agencies and branches of government looking at the overdose problem, Endo created what it says is a crush-resistant version of the drug, and put the last of the dosages of the new version into the market in June of this year. Then Endo employed legal and regulatory tactics to try to delay generic competitors from taking revenue from its second best-selling product.

The hope was that if the old version was declared unsafe, generic versions would have to be pulled from the market or prohibited from entering.

In August, Endo filed two citizens' petitions with the FDA seeking to have its crushable version declared unsafe compared with the newer noncrushable version, and have generic versions - the crushable variety - declared null. Under the normal timeline, the FDA would need to answer those petitions by May 2013.

But on Nov. 30, Endo filed suit in U.S. District Court in Washington hoping to force a decision by Dec. 31 - one day before a generic competitor is scheduled to enter the market.

In a statement, Endo said it argued in the suit that "the FDA failed to meet its legal obligation to determine in a timely manner whether the original formulation of Opana ER was withdrawn from the market for reasons of safety."

On Wednesday, U.S. District Judge Reggie B. Walton dismissed Endo's suit, saying the FDA was operating in a timely manner.

In its court filing, the FDA indicated it was not convinced Endo was only concerned with the potential for overdoses, since Endo had not recalled the original formulation of Opana ER. It simply stopped marketing it after the crush-resistent version was on the market.

The FDA also argued that Endo's insistence on a decision by Dec. 31 was less a safety concern than a tactic to delay a generics company from entering the market on Jan. 1.

One generic version is already on the market - Endo is suing that company - and others are to start in 2013. Impax Pharmaceuticals will start selling its version of the medicine Jan. 1.

Impax, like other generic companies, negotiated a settlement of a patent-infringement suit with Endo in 2010, allowing it to enter the market Jan. 1. Such arrangements are examples of the pay-to-delay settlements between the makers of brand-name drugs and the makers of generics of the same medicines that the Supreme Court will hear arguments on in 2013.

"The Dec. 31 'deadline' reflects only Endo's commercial concern that, as a result of a settlement agreement it made with another manufacturer, it will face additional generic competition beginning Jan. 1, 2013," the FDA attorneys wrote in a memo submitted as part of their objection to the suit and request for an injunction. "Endo's self-inflicted timeline does not trump the statute and does not justify the emergency relief it seeks."

Dave Holveck, president and chief executive officer of Endo Health Solutions, announced last week that he was retiring and that the company was lowering its financial expectations. Opana ER's sales fell from $97.8 million in the third quarter of 2011 to $62.2 million in the same period of 2012. The generic competition in 2013 will further hurt sales.

Holveck said in a statement that the company was "extremely disappointed" by the judge's decision.

Contact David Sell at dsell@ phillynews.com or 215-854-4506. Read his blog at www.philly.com/phillypharma and on Twitter @phillypharma.