Merck & Co. won two cases related to its painkiller Vioxx on Thursday after two appeals courts in Texas and New Jersey, reversed verdicts against the company for damages and death in patients who took the drug.

Shares of Merck closed at $38.92 or 26 cents up and rose 18 cents more in after hour's electronic trade to $39.10 in the New York Stock Exchange on Thursday.

Today's decisions overturn almost $40 million of damages and attorneys fees previously awarded to plaintiffs at trial, said Bruce Kuhlik Merck's general counsel.

In Texas, a jury awarded plaintiff Carol Ernst $253.4 million after finding Merck's Vioxx responsible for the dead of her husband. However the court reduced it later to $26 million under state damages caps.

The case in Texas started in 2005 and was the first Vioxx lawsuit that went to trial. Today, the Texas Appeals Court overturned the veredict and ruled that there was no competent evidence that a blood clot triggered by Vioxx ingestion caused the death of Mr. Ernst .

Kuhlik said in a statement the company was gratified that the Texas appeals court correctly reversed the previous decision.

Separately, Superior Court of New Jersey's Apellate Division voided two Vioxx cases treated at the same time in Atlantic City in 2006.

One is the case of John and Irma McDarby who were awarded by a jury by $4.5 million in compensatory damages and $9 million in punitive for use of the painkiller Vioxx totaling $13.5 million. But the court today annulled the punitive award and part of the compensatory damages that was based on New Jersey's consumer fraud statute.

The other case involved plaintiff Thomas Cona but the court upheld a verdict in favor of Merck.

We intend to seek further review of the portion of the award that remains standing after the New Jersey decision. We continue to believe Merck acted responsibly. Kuhlik said.

Drug manufacturer Merck pulled out Vioxx in September 2004 after the company founded the drug doubled risks of heart attacks and also strokes.

In November the company announced it settled thousands of customers' claims linked to Vioxx with $4.86 billion. The drug was taken for about 20 million patients in the United States before it was withdrawn from the market.