(CNN) -- The likelihood of experiencing a heart attack was calculated to increase by an average of 20% to 50%, compared with someone not taking the drugs, regardless of the dosage and amount of time the medications are taken.
The findings are observational and based on an association, however, with the drugs not proved to be a a direct cause of heart attack.
This group of drugs includes ibuprofen, diclofenac, celecoxib and naproxen, which are available over the counter or by prescription for higher doses, to relieve pain or fever resulting from a range of causes, including flu, headaches, back pain and menstrual cramps. Their range of uses also means they are often taken as needed, for short periods of time.
The level of risk increased as early as one week into the use of any drug in this category and at any dose, and the risk associated with taking higher doses was greatest within the first month.
"We found that all common NSAIDs shared a heightened risk of heart attack," said Dr. Michèle Bally, an epidemiologist at the University of Montreal Hospital Research Center, who led the research. "There is a perception that naproxen has the lowest cardiovascular risk (among the NSAIDs), but that's not true."
Researchers' overall finding was that taking any dosage of these drugs for one week, one month or longer was linked to an increased risk of a heart attack. The risk appeared to decline when these painkillers were no longer taken, with a slight decline one to 30 days after use and a greater decline, falling below 11%, between 30 days and one year after use.
Based on the paper, published Tuesday in the BMJ, Bally's team suggests that doctors and patients weigh the potential harms and benefits before relying on the drugs as a treatment option.
"People minimize the risks because drugs are over the counter and they don't read labels," Bally said. "Why not consider all treatment options? ... Every therapeutic decision is a balance of benefits and risk."