They are given at much higher doses than those found in over-the-counter remedies, which are used for occasional headaches, aches and pains.

The study, in the British Medical Journal, found that compared with a dummy drug lumiracoxib increased the risk of heart attacks, while ibuprofen was linked to the highest risk of stroke (more than treble the risk).

Diclofenac almost tripled the risk, while etoricoxib and diclofenac were associated with around a fourfold increased risk of suffering death from cardiovascular causes.

The authors, from the University of Bern in Switzerland, said: "Although uncertainty remains, little evidence exists to suggest that any of the investigated drugs are safe in cardiovascular terms."

In an accompanying editorial, Prof Wayne Ray, from the department of preventive medicine in Nashville, said: "Naproxen seemed least harmful.

"Cardiovascular risk needs to be taken into account when prescribing any non-steroidal anti-inflammatory drug."

Overall, the number of heart attacks and strokes reported was low compared to the number of patients.

In 29 of the trials, there were a total of 554 heart attacks and in 26 trials there were 377 strokes. In 28 trials there were 676 deaths.