Merck & Co. recently agreed to pay $4.85 billion to settle product liability lawsuits surrounding the pain drug Vioxx.

The agreement would cover an estimated 45,000 to 50,000 cases pending in state and federal courts in the United States, provided that certain conditions are met. The plaintiffs alleged that Vioxx caused heart attack or ischemic stroke.

The settlement disclosure comes three years after the company removed Vioxx from the market. Merck and plaintiffs’ attorneys said the agreement marks an end to protracted litigation.