The $180 million deal includes a $30 million upfront payment to Raleigh-based BioDelivery, as well as $95 million in potential development milestone payments and $55 million of potential payments if the treatment reaches certain sales targets.
BioDelivery will also receive royalty payments on U.S. sales of the drug.
The company's stock more than doubled in early trading today on the news.
The deal represents a remarkable reversal of fortunes for the drug, BEMA Buprenorphine. In September, BioDelivery's stock plummeted after it announced that the drug failed to outperform a placebo in a Phase 3 clinical trial.
The company subsequently launched a new study of the effectiveness of the drug based on some positive data collected in the latest trial.
Under the terms of the deal announced today, Endo will be responsible for manufacturing, distributing, marketing and sales of the drug worldwide. Endo will commercialize BEMA Buprenorphine outside the U.S., and the two companies will collaborate on the planning and finalization of the Phase 3 trials.
BioDelivery has said in the past that BEMA Buprenorphine could have peak annual sales of $500 million.
Buprenorphine already is an approved pain reliever, but the version on the market is delivered via a patch that is worn on the skin for seven days. BioDelivery's version consists of a film that is put in the inside of the cheek twice daily.
After announcing the disappointing Phase 3 trials in September, BioDelivery executives said that tweaking the design of the new trial and tightening the criteria for patients who participate in it will lead to successful results.
The new study is expected to take about nine months to complete.
BioDelivery, which employs 20 workers, already has an oral pain patch, Onsolis, for cancer patients. It has been available in the United States since October 2009.
Sales of Onsolis have been disappointing, but the company is optimistic that new federal regulations for narcotic painkillers used by cancer patients will level the playing field for the drug.