By Brian Blackstone in Zurich, Denise Roland in London and Jonathan D. Rockoff in New York

Johnson & Johnson has agreed to acquire Actelion Ltd. for $30 billion, in an unusual deal that will also spin out the Swiss biotech company's drug-discovery operations.

The deal, the largest in J&J's history and announced by both companies Thursday, ends weeks of seesaw negotiations. J&J initially abandoned talks, only to resume them about a week later after the companies entered into exclusive negotiations.

Its peculiar structure, in carving out early-stage research, addresses Chief Executive Jean-Paul Clozel's longstanding resistance to selling the business over concerns that an acquisition would destroy the company's drug-discovery engine.

At the same time, it gives J&J a clutch of promising new drugs that will bolster its portfolio of rare-disease treatments as its top-selling drug faces new competition.

The new drugs would immediately and significantly add to J&J sales, while giving the company access to promising candidates for multiple sclerosis and hypertension, Chief Executive Alex Gorsky said in an interview.

More generally, the deal underscores the hefty price big pharmaceutical companies can face to replenish their drug pipelines as their top sellers lose patent protection and face competition from less-expensive copy drugs.

Shares in Actelion surged as high as 277 Swiss francs ($277) following the announcement, or nearly 22%, while J&J shares slipped 0.8% in morning trade in New York.

J&J is paying $280 a share in cash for Actelion, retaining the company's commercially available treatments for rare diseases such as an artery disorder known as pulmonary arterial hypertension, plus a handful of drugs in late-stage development.

Actelion will spin off its drug-discovery operations into a separate company, and J&J initially will hold 16% of the shares of the new company with an option to acquire another 16%. Dr. Clozel, 61 years old, will lead the new company and will pocket around $1.5 billion from the deal through his 5% stake in Actelion.

The spinoff could be "the Genentech of J&J," Actelion Chairman Jean-Pierre Garnier said, referring to the biotech company that developed several new drugs while partnered with Roche Holding AG, which later bought it.

The Actelion-J&J spinoff echoes Actelion's own roots: The biotech firm was spun out ofRoche 20 years ago by a group of scientists there, including Dr. Clozel, a cardiologist, and his wife, Dr. Martine Clozel, a pediatrician, after the Swiss pharmaceutical giant decided against pursuing their research.

Actelion, Europe's biggest biotech firm by sales and market capitalization, started out with two drugs that had been developed inside Roche, one of which went on to become blockbuster pulmonary arterial hypertension drug Tracleer.

It went on to develop two follow-on PAH drugs, Opsumit and Uptravi, though the early-stage research efforts that will make up the spun-off entity are more diverse, spanning conditions including lupus and insomnia.

Sales of Actelion's drugs have been growing 20% a year in recent years, said Mr. Garnier. J&J hopes to accelerate that growth by taking advantage of the company's global reach, Mr. Gorsky said.

"If you have blockbuster drugs in a rare disease area that's shown to be moreimmune to pricing pressure, that is a very valuable asset to have," said Jefferies analyst Peter Welford. He said that while the deal valuation was above average, it was still reasonable.

"It's a win-win," he said. "[Dr. Clozel] sold a company for $30 billion, which shows they have created substantial value. At the same time he and his employees get to keep the bit they're passionate about: the R&D."

The spun-off entity is likely to fetch a market valuation of 1 billion to 1.5 billion Swiss francs as a stand-alone company, he added.

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 Inc.'s copy drug, Inflectra. J&J has said 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.

For the first nine months of last year, Actelion reported net profit of 581 million Swiss francs on revenue of 1.79 billion Swiss francs.

J&J first sat down with the company in August in New York, Mr. Gorsky said. The negotiations picked up in November, the same month that the companies first disclosed they were in talks over a possible deal.

The next month, J&J said it had bowed out of the talks, while Actelion said it had "engaged in discussions with another party" that The Wall Street Journal reported to be French drug company Sanofi SA. That effort came after Paris-based Sanofi lost out to Pfizer in a bidding war for cancer biotech Medivation Inc.

Maintaining the independence of Actelion's drug-discovery operation was essential to clinching the deal, said Mr. Garnier, who added that the company had brushed aside potential deals in the past.

Actelion "didn't want to sell the company at all," Mr. Garnier saidin an interview with The Wall Street Journal, while J&J initially balked at carving out the R&D of Actelion. "They didn't love it at first sight. It took a few dates. But eventually they" understood and agreed to the setup.

Brian Blackstone in Zurich and Ben Dummett in London contributed to this article.

Write to Brian Blackstone at brian.blackstone@wsj.com, Denise Roland at Denise.Roland@wsj.com and Jonathan D. Rockoff at Jonathan.Rockoff@wsj.com

(END) Dow Jones Newswires

January 26, 2017 12:06 ET (17:06 GMT)

Copyright (c) 2017 Dow Jones & Company, Inc.