Bayer AG and Johnson & Johnson have agreed to settle more than 25,000 U.S. lawsuits alleging that their blockbuster blood thinner Xarelto caused unstoppable and in some cases fatal bleeding for a total of $775 million, court documents on Monday showed.

The amount will be shared equally between the two companies that jointly developed the drug. Bayer and J&J do not admit liability under the agreement.

The settlement will resolve all pending U.S. lawsuits over Xarelto, which plaintiffs claimed caused uncontrollable and irreversible bleeding leading to severe injuries and even death among thousands of patients.

Plaintiffs accused the drugmakers of having failed to warn about the bleeding risks, claiming their injuries could have been prevented had doctors and patients been provided adequate information.

Bayer in a statement on Monday said it continues to believe the claims are without merit.

“However, this favorable settlement allows the company to avoid the distraction and significant cost of continued litigation,” the company said.

Lawsuits over Xarelto began piling up in 2014 and the companies had so far won all six trials over Xarelto’s alleged bleeding risk.

J&J in a statement said it continued to believe in the safety of Xarelto, but that the settlement was the right thing to do for patients and their doctors.

Xarelto is Bayer’s best-selling drug. It contributed 3.6 billion euros ($4.07 billion) in revenue to the German group’s pharmaceutical business last year.

Bayer said its share of the settlement amount will be partially offset by product liability insurance.

Bayer jointly developed Xarelto with J&J’s Janssen Pharmaceuticals unit, which sells the blood clot preventer under a licensing agreement in the United States.

J&J reported 2018 Xarelto sales of $2.47 billion.

The U.S. Food and Drug Administration approved Xarelto in 2011. It is prescribed for people with atrial fibrillation, a common heart rhythm disorder that increases the risk of stroke. The drug is used to treat and reduce the risk of deep vein thrombosis and pulmonary embolisms.

The companies in the past have said Xarelto’s warning label provides “complete, accurate and science-based information on the medicine’s benefits and risks.”

The majority of the claims were consolidated in New Orleans federal court, where three cases were selected as so-called bellwether trials, aimed to help determine the range of damages and define settlement options. The companies won those three trials throughout 2017.

J&J and Bayer were also cleared of liability in three other state court trials in 2018.

Xarelto is among a class of oral blood thinners, including Bristol-Myers Squibb and Pfizer’s Eliquis, that are alternatives to decades-old warfarin. Most of the lawsuits over Eliquis have been dismissed by U.S. judges.

A similar drug, Boehringer Ingelheim’s Pradaxa, also became subject of thousands of lawsuits claiming the company understated its bleeding risk. Boehringer in 2014 reached a $650 million settlement to resolve more than 4,000 of those cases. ($1 = 0.8837 euros)