Johnson & Johnson (NYSE: JNJ) agreed to buy Actelion Ltd. for $30 billion and spin off the Swiss drugmaker’s research and development operations, clinching its largest deal ever to become a leader in medicines for a rare type of high blood pressure.

J&J, which is funding the transaction with the cash it holds outside the U.S., will fulfill its goal of gaining a new drug category and see its earnings get an immediate boost from the transaction. The deal is expensive compared to recent industry takeovers such as Pfizer Inc.’s (NYSE: PFE) acquisition of Medivation Inc. (Nasdaq: MDVN) and AbbVie Inc.’s (NYSE: ABBV) purchase of Pharmacyclics Inc., according to an analysis from Bloomberg Intelligence.

The agreement caps two months of stuttering negotiations to find a deal structure palatable to Jean-Paul and Martine Clozel, Actelion’s founders. The discussions were interrupted for several days after New Brunswick, New Jersey-based J&J walked away on Dec. 13, only to return to the negotiating table about a week later, interrupting talks Clozel had started holding with France’s Sanofi.

J&J will begin a tender offer to buy shares of Allschwil, Switzerland-based Actelion for $280 each in cash, the companies said in a statement. The price, which equals 280.08 Swiss francs, is 23 percent above Jan. 25 closing level. The research and development operations will be spun off to Actelion shareholders as a new publicly traded company with 1 billion francs of cash. J&J will keep a 16 percent stake in the new company.

J&J is paying more than 21 times Actelion’s estimated 2020 earnings per share, more than double what AbbVie spent on its cancer biotech, which “shows how hard it is to find an asset that actually makes a difference in your earnings,” said Sam Fazeli, an analyst for Bloomberg Intelligence in London.

It’s possible that the new U.S. administration could present an obstacle to using overseas cash to fund the deal, Fazeli said.

J&J held $38.2 billion in cash and equivalent securities through its foreign subsidiaries as of Jan. 3, 2016. Repatriating all of the funds to the U.S. could have tax implications, the drugmaker said at that time.

The Actelion deal comes just as U.S. President Donald Trump begins to offer details on his plans to create jobs and persuade U.S. companies to keep their operations in the U.S. since taking over on Jan. 20. Trump has also said he wants American companies to bring trillions of dollars in offshore cash back home, arguing that the money could be used to fund a manufacturing renaissance. (But J&J may have an inside track with the new president: Trump has tapped New York Jets owner Woody Johnson -- the great-grandson of J&J’s founder -- to serve as U.S. ambassador to the U.K., according to a person with knowledge of the matter.)

Access to Actelion’s drugs Tracleer, Opsumit and Uptravi, which all treat life-threatening pulmonary arterial hypertension, will make J&J a leader in treating the disease and help it expand beyond autoimmune, heart and cancer drugs.

The new deal will immediately start adding to J&J’s earnings when the transaction in completed by the end of the second quarter, the companies said. The U.S. behemoth expects the transaction to boost its long-term profit growth by as much as 2 percent over analysts’ expectations.

Meanwhile, the transaction deals a blow to Sanofi, which had also courted Actelion. This is the second time the French drugmaker will be left empty handed, after losing out on cancer treatment maker Medivation to another U.S. giant, Pfizer, in August.

The Clozels and a team of scientists who split from Roche Holding AG founded Actelion about 20 years ago. The discovery of the blockbuster Tracleer propelled it over a decade ago to becoming a leader in the treatment of pulmonary arterial hypertension. Uptravi and Opsumit followed and are set to replace Tracleer, which has lost patent protection and faces challenges from copycat drugs.

Clozel, who is Actelion’s chief executive officer and among its largest shareholders, had said in the past he wanted the company to remain independent. The CEO is a believer in Actelion’s pipeline of experimental medicines, and he and his wife have resisted takeover bids over the years.

Clozel will now lead the new R&D company as CEO, while Actelion chairman Jean Pierre Garnier heads the board. Shares in the business, which will be listed on the Six Swiss exchange, will be distributed to shareholders as a dividend. As part of the deal, J&J will have rights to an additional 16 percent of the business through a convertible note, as well as an option on ACT-132577, a product being developed for resistant hypertension.

The new company’s cash and more advanced drugs in development could be worth about 14 to 20 Swiss francs a share, based on back of the envelope calculation, said Peter Welford, an analyst at Jefferies LLC in London.

Before walking away, J&J had made Actelion an offer that it later increased to about $260 a share, people familiar with the situation have said, valuing the Swiss biotech at about $28 billion. Paris-based Sanofi entered with its own proposal of about $275 a share, which included a so-called contingent value right, or CVR, for Actelion stockholders that would pay out depending on the performance of certain pipeline drugs, according to people familiar with the offer. Those talks faltered amid complications over the CVR, the people said.

Lazard Ltd. is lead financial adviser to Johnson & Johnson with Citigroup Inc. (NYSE: C) also providing advice. Cravath Swaine & Moore LLP, Homburger AG and SextonRiley LLP are J&J’s legal advisers. Bank of America Corp. is Actelion’s lead adviser, with Credit Suisse Group AG also providing advice. Niederer Kraft & Frey, Wachtell Lipton Rosen & Katz, and Slaughter & May are legal advisers to Actelion.

The boards of both companies have approved the deal; the closing is now pursuant to at least 67 percent of Actelion shares being tendered by its holders when the offer begins in mid-February. J&J plans to fund the takeover with cash held outside the U.S.