By Peter Stiff

Sanofi SA has agreed to buy Principia Biopharma Inc. in a deal that values the developer of a promising multiple sclerosis treatment at $3.68 billion, the health-care giant's latest move to focus more on specialty therapies over mass-market medicines.

The French company said the purchase would give it full control over the MS treatment that the two companies were already codeveloping, simplifying commercialization and eliminating future royalty payments. The brain-penetrant BTK inhibitor SAR442168 posted upbeat Phase 2 trial data in MS patients earlier this year and Phase 3 trials started in June.

More broadly, Sanofi said the deal would strengthen its research and development work in autoimmune and allergic diseases, and allow it to develop the technology behind the MS drug for use in other central nervous system diseases and therapeutic areas.

The deal will also hand Sanofi a therapy called rilzabrutinib, which is currently in Phase 3 trials for patients with pemphigus, a rare autoimmune disease that causes blistering of the skin.

Under the deal, Sanofi agreed to pay $100 a share for San Francisco-based Principia, a 10% premium on its closing price Friday. Principia's shares have risen over 65% so far this year on speculation of a possible takeover, potentially by Sanofi.

"This acquisition advances our ongoing R & D transformation to accelerate development of the most promising medicines that will address significant patient needs," said Sanofi Chief Executive Paul Hudson.

Mr. Hudson took the helm of Sanofi in September and has since set out plans to focus the company's research pipeline on the more-lucrative areas of rare diseases and cancer, pivoting away from historically strong areas such as the treatment of cardiovascular disease and diabetes.

Under those plans, Sanofi has said it would stop investing in diabetes research, while bolstering its oncology business with the $2.5 billion acquisition of biotech Synthorx Inc.

Analysts expect Sanofi could be in the market for further acquisitions in specialist disease areas, with the sale of its long held stake in Regeneron Pharmaceuticals Inc. earlier this year, giving the company a sizable war chest for bold-on deals.

Write to Peter Stiff at peter.stiff@wsj.com