LONDON/PARIS (Reuters) – Shares of GSK and Sanofi surged in early trading on Wednesday, following the dismissal of thousands of U.S. lawsuits claiming that the heartburn drug Zantac caused cancer.

The ruling on Tuesday by U.S. District Judge Robin Rosenberg in West Palm Beach, Florida, knocked out about 50,000 claims in federal court, although it does not directly affect tens of thousands of similar cases pending in state courts around the country.

Zantac, first approved in 1983, became the world’s best selling medicine in 1988 and one of the first-ever drugs to top $1 billion in annual sales. Originally marketed by a forerunner of GSK, the medicine has been sold by several companies at different times, including Pfizer, Boehringer Ingelheim and Sanofi as well as a plethora of generic drugmakers.

All drugmakers have denied that Zantac causes cancer.

Shareholders in the companies involved feared a worst-case scenario where costs run into billions of dollars, as happened in cases involving Merck & Co’s painkiller Vioxx and Bayer’s glyphosate-based weedkiller.

GSK crowned the pan-European index with a 13% rise, heading for its best day since 1998, followed by Sanofi’s 8% climb, on track for best day since 2008.

Jefferies analysts – who had previously estimated Zantac liability for Sanofi in the range of $500 million to $8 billion and $1 billion to $17 billion for GSK – said the latest judgement should clear about 80% or more of the Zantac overhang.

The decision bodes well for state cases too, they wrote in a note.

Shares of Haleon, which comprises consumer health assets once owned by GSK and Pfizer and spun out as an independent company in July, also rose 5%.

Barclays analysts said they viewed Zantac as substantially derisked, “leaving Haleon investible again for those without the appetite for pharma litigation risk.”

(Reporting by Tassilo Hummel in Paris and Natalie Grover in London; Editing by Sudip Kar-Gupta and Louise Heavens)