Bayer AG agreed to acquire U.S. biotech company Asklepios BioPharmaceutical Inc. for as much as $4 billion, bolstering its pharma division with experimental gene therapies before patents expire on some key drugs.

The German chemicals giant will pay $2 billion upfront and another $2 billion in potential milestone payments in cash for closely held AskBio, a North Carolina-based company that’s developing gene therapies for ailments such as Parkinson’s disease and congestive heart failure.

Bayer is expanding in the cutting-edge field of gene and cell therapies at a time when its blockbuster drugs age and the company’s crop-protection business reels from the pandemic’s impact on farm commodities after its purchase of Monsanto.

Drugmakers including Novartis AG, Roche Holding AG and Bristol-Myers Squibb Co. have snapped up makers of gene therapies because they offer potential to cure a wide range of often-rare diseases by replacing or repairing errors in the body’s instruction manual. Their potential has been matched by breakthrough prices, as companies have sought to charge hundreds of thousands of dollars for them -- or more.

Bayer said in a statement it created a special business unit for cell and gene therapies, bringing together research performed by other entities including BlueRock Therapeutics, which it fully acquired last year.

“It’s an incredible addition for us in our emerging cell- and gene-therapy business,” Stefan Oelrich, Bayer’s head of pharma, said in an interview. “A puzzle is coming together with AskBio really being our centerpiece.”

The U.S. company, founded in 2001, has a contract manufacturing business that makes components used by other cell- and gene-therapy companies -- a division whose returns have helped fund AskBio’s search for its own experimental treatments.

The booming industry means “right now there’s not enough manufacturing services available,” Sheila Mikhail, the company’s co-founder and chief executive officer, said in a telephone interview.

AskBio has licensed products undergoing clinical trials for treating patients with hemophilia and Duchenne muscular dystrophy to drugmakers including Pfizer Inc. It’s also developing medicines for other neuromuscular, central nervous system, cardiovascular and metabolic diseases, the company said.

For Bayer, the planned takeover is “a positive step to bolster the long-term pharma pipeline,” Morgan Stanley analysts led by James Quigley wrote in a note. “However, the financial payment does seem relatively high for an asset that is unlikely to see any sales contribution for at least the next four years.”

AskBio last year raised $225 million from TPG Capital and Vida Ventures, which took minority stakes in the company. It was the first-ever fundraising, since previously the manufacturing business was paying for therapy developments, according to Mikhail.

AskBio had been preparing to do an initial public offering when it was first approached by Bayer, Mikhail said. The advantages of being acquired included getting access to Bayer’s extensive library of small molecules, which could help drive down costs of future medicines, and benefiting from Bayer’s experience in conducting clinical trials, she said.

Bayer expects the deal to close later this year, and said AskBio will continue to operate as an independent company.

The acquisition would be the largest for Bayer’s health-care operations in more than half a decade, and the biggest purchase since the $63 billion takeover of agriculture giant Monsanto. That megadeal saddled Bayer with an avalanche of litigation related to products including the weedkiller Roundup, which has driven Bayer’s market value down by more than half during the tenure of Chief Executive Officer Werner Baumann.

Baumann, who received a contract extension this summer, has struggled to put the Roundup litigation fully behind the company so that he can more fully concentrate on another challenge -- proving to investors that it makes sense to keep crop science and health-care businesses under one roof.