Hundreds of thousands of arthritis patients in the UK have been urged to contact their doctor after a widely-used painkiller was withdrawn by its manufacturer.

The Medicines and Healthcare products Regulatory Agency (MHRA) said that people taking Vioxx (rofecoxib) should arrange to change to an alternative prescription.

It is used in the treatment of pain and inflammation in osteoarthritis and rheumatoid arthritis, and in the management of acute pain.

The drug, used by an estimated 400,000 people in the UK, was withdrawn by makers Merck Sharp & Dohme after a long-term study showed an increased risk of heart attack and stroke after 18 months or more of use.

The MHRA said that any patients taking Vioxx should contact their doctor by phone or at the next convenient appointment to arrange to change to a different medication.

The safety of the drug had been under continuous review since it was authorised in 1999.

The product information includes warnings and precautions for patients with predisposing factors to heart attack and stroke.

The UK's Committee on Safety of Medicine had warned in the past that Vioxx lacks protection against heart attack and stroke.

Mayur Lakhani, chairman elect of the Royal College of GPs, said: "There is no cause for alarm but if people are worried we would advise them to stop taking Vioxx and use a safer painkiller, which their local pharmacist will be able to advise them on."

Merck has ceased distribution of Vioxx on a worldwide basis with immediate effect.

The decision followed information from a three-year study, which was aiming to show that Vioxx at a 25mg dose prevented recurrence of polyps in the colon and rectum.

But the trial was halted after Merck discovered that patients taking Vioxx had a higher heart attack risk compared to patients taking the dummy pills.

In a statement on the company's website, Merck's chairman Raymond Gilmartin said: "We are taking this action because we believe it best serves the interests of patients.

"Although we believe it would have been possible to continue to market Vioxx with labelling that would incorporate these new data, given the availability of alternative therapies, and the questions raised by the data, we concluded that a voluntary withdrawal is the responsible course to take."

Vioxx was launched in the US in 1999 and has been marketed in more than 80 countries. Worldwide sales of Vioxx last year were £1.39bn.

The trial that found an increased risk of heart attack and stroke started in 2000 and involved 2,600 patients.