Concluding weeks of speculation, overnight Johnson & Johnson (JNJ) announced it agreed to acquire Actelion Pharmaceuticals (ALIOF), Europe’s biggest biotech company, for $30 billion, or CHF280 per share, expanding the U.S. pharma giant’s portfolio of rare-disease treatments as its top-selling drug faces new competition.

The deal, announced and agreed on Thursday by both companies, ends weeks of seesaw negotiations. J&J initially abandoned talks over price, only to resume them about a week later after the companies entered into exclusive negotiations. The deal is expected to close by Q2 2017. Shares in Swiss company Actelion surged 21% following the announcement.

“We believe this transaction offers compelling value to both Johnson & Johnson and Actelion shareholders,” said J&J Chairman and Chief Executive Alex Gorsky in a statement.

J&J wil retain Actellion’s commercially available treatments for rare diseases such as an artery disorder known as pulmonary arterial hypertension. Actelion will spin off its drug-discovery R&D operations into a separate company designated for now as R&D NewCo, and J&J will initially hold 16% of the shares of the new company, with an option to acquire another 16%.

As the WSJ notes, the deal comes as J&J’s autoimmune therapy drug Remicade, which generated $4.5 billion in U.S. sales in 2015 and is the company’s top-selling drug, faces new competition from the U.S. launch of Pfizer’s copy drug, Inflectra. J&J has said that it has several new drugs in development that could offset any revenue loss from this rivalry, but the Actelion acquisition would more quickly help plug that hole.

Actelion, founded in 1997 by husband-and-wife team Jean-Paul and Martine Clozel along with other former Roche Holding Ltd. employees, has resisted past takeover overtures. Under the J&J deal, Mr. Clozel will remain involved in the operation, overseeing R&D NewCo.