"NSAIDs are very commonly used for both acute and chronic pain," Marie Griffin of the Vanderbilt University Medical Centre in Nashville told AFP by email in an analysis of the findings.
Over-the-counter doses are lower and generally recommended for short periods for acute painful conditions. Chronic use of more than about a week or 10 days can be prescribed for back, knee, hip or neck pain, or chronic headaches.
Earlier research had linked the drugs' use to a risk of serious gastrointestinal problems. This led to a new generation of NSAIDs called coxibs that were designed to reduce these complications, but instead came under scrutiny for increasing the risk of heart attacks.
The new study, published in The Lancet, found that high doses of not only coxibs but also older-generation NSAIDs like ibuprofen (Advil) or diclofenac (Voltaren) were associated with heart disease risk.
"For every 1,000 individuals with a moderate risk of heart disease allocated to one year of treatment with high-dose diclofenac or ibuprofen, about three would experience an avoidable heart attack of which one would be fatal," said a press statement accompanying the study.
"In addition, all NSAIDs double the risk of heart failure and produce a 2-4 times increased risk of serious upper gastrointestinal complications such as bleeding ulcers," said the statement.
A high dose of diclofenac is indicated as 150 milligrammes per day and of ibuprofen about 2,400 milligrammes per day.
"High doses are generally doses available only with a prescription," said Griffin.
The study authors studied the data of 353,000 patients gathered in 639 trials.
They said the increased heart attack risk from NSAIDs rose in proportion to a patient's underlying risk, so it was highest in those with a previous history of heart disease, high blood pressure or cholesterol.
Similar results had been published before, which is why some of the drugs are not available in some countries, said Griffin.
The reason for the heart attack link was not clear, she added, "but likely because they increase likelihood of clotting. These drugs also increase blood pressure."
Alternative medicines include acetaminophens (Tylenol) or opioids.
In a comment on the study, British Pharmacological Society member Donald Singer said the findings underscored a key point: "Powerful drugs may have serious harmful effects.
"It is therefore important for prescribers to take into account these risks and ensure patients are fully informed about the medicines they are taking," Singer said.
But it was also important to note, he said, that the authors themselves were not sure whether the risks would persist in longer-term treatment or on lower doses
Safe and effective chronic pain treatments were sorely needed, said Griffin.
"In the meantime, long-term use of high-dose NSAIDs should be reserved for those who receive considerable symptomatic benefit from the treatment and understand the risks," she said.