BioDelivery Sciences International (NASDAQ:BDSI) has secured $20 million in debt financing as the company prepares to file for regulatory approval on one drug and complete late-stage clinical studies on another.

Raleigh-based BDSI on Monday announced the loan from an affiliate of MidCap Financial, a commercial finance firm that specializes in lending in the health care sector. BDSI aims to file a new drug application for Bunavail, developed to treat opioid dependence. The company is also working on phase III clinical trials for BEMA Buprenorphine, which is being developed to treat chronic pain. BEMA Buprenorphine is partnered with Endo Health Solutions and completing the phase III trials will result in milestone payments to BDSI.

BDSI’s CEO Mark Sirgo said in a statement that the financing helps the company get to the final steps of submitting the Bunavail drug application while also moving ahead on its Clonidine Topical Gel, a diabetic neuropathy treatment that the company licensed earlier this year from Arcion Therapeutics.

The secured loan has a term of 36 months with interest-only payments for the first 6 months. The interest rate is 8.45% plus a LIBOR floor of 0.5%. Under the terms of loan, MidCap was also issued a warrant to purchase 357,143 shares of BDSI common stock with an exercise price of $4.20, the 20-day volume-weighted average share price of BDSI’s common stock prior to closing of the loan.