Sanofi says it will pay up to $300M for AstraZeneca's rare thyroid cancer treatment Caprelsa

French drugmaker Sanofi said Monday it will pay up to $300 million to buy a thyroid cancer drug from British competitor AstraZeneca.

AstraZeneca said it had $48 million in sales of Caprelsa in 2014. The drug is on the market in 28 countries, including the U.S., as a treatment for inoperable medullary thyroid cancer, a disease that attacks thyroid cells that maintain calcium levels in the blood. U.S. regulators awarded it orphan drug status, which blocks competing drugs from the market for a time.

AstraZeneca is studying the drug as a treatment for a second type of thyroid cancer called differentiated thyroid carcinoma. A late-stage trial is expected to be complete before the end of 2015, and the companies also expect to close the sale by the end of the year pending approval from regulators.

Sanofi's Genzyme unit will pay $165 million for Caprelsa, and it agreed to make another $135 million in milestone payments based on regulatory development and sales targets.

U.S.-traded shares of Sanofi fell 43 cents to $53.11 in afternoon trading and U.S.-traded shares of AstraZeneca PLC lost 21 cents to $32.67.