New Jersey’s Supreme Court on Thursday rejected a class action lawsuit against Merck & Co. over its withdrawn painkiller Vioxx.

The ruling is a huge legal victory for the drugmaker, which faces nearly 27,000 individual lawsuits from people claiming Vioxx harmed them.