Johnson & Johnson and Bayer said Monday that they had agreed to pay $775 million to settle about 25,000 lawsuits involving the blood thinner Xarelto, which they jointly sell.

The settlement, which will be split evenly between the two companies, resolves state and federal cases in which patients sued the companies for failing to warn about potentially fatal bleeding episodes when patients took the drug.

Neither company admitted liability, and each noted that the companies had prevailed in the six lawsuits that went to trial. In a statement, Janssen, the pharmaceutical division of Johnson & Johnson, said it was settling because such complex litigation "demands an enormous amount of time and resources." It added: "What's the bottom line? We stand behind Xarelto and are eager and excited to move forward."

In a separate statement, Bayer said, "We remain committed to the more than 45 million patients who have been prescribed Xarelto worldwide."

"This is a fair and just resolution for thousands of consumers who have substantial claims," Andy Birchfield of Beasley Allen, the co-lead counsel of the plaintiff's steering committee for the federal legislation, said in a statement.

Xarelto is one of a new group of blood thinners intended to replace warfarin, a widely used and decades-old drug that required frequent blood tests and a strict diet. Xarelto, along with similar drugs like Eliquis and Pradaxa, did not require such tests.

Lawyers for the patients had argued that the companies failed to warn patients that Xarelto, which thins the blood to prevent clots that lead to strokes, could trigger massive bleeding in some people, leading to deaths and serious injury.