Jazz Pharmaceuticals said Monday it is acquiring an experimental narcolepsy drug in a deal that could be worth more than $397 million.

The drug is called ADX-N05, and it is being developed by Aerial BioPharma. The drug is intended to treat daytime sleepiness in narcolepsy patients, and Jazz said it wants to start late-stage testing as soon as possible.

The Irish drugmaker agreed to pay Aerial BioPharma $125 million upfront, and it could make another $272 million in payments if the drug reaches development milestones and sales targets. Aerial BioPharma will also get royalties on sales if the drug is approved.

The Dublin-based company also wants to study ADX-N05 as a treatment for excessive sleepiness caused by other conditions, including obstructive sleep apnea.

Jazz Pharmaceuticals PLC's best-selling product is Xyrem, also a treatment for narcolepsy. However the company has warned that a low-cost generic version of Xyrem could reach the market soon.

Jazz is in the process of acquiring Italian drugmaker Gentium SpA in a deal valued at around $1 billion. It expects to complete the deal during the first quarter.

Shares of Jazz Pharmaceuticals rose 60 cents to $139.16 in morning trading after trading as high as $140.48 earlier. Factset said that was an all-time high.