Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Common painkillers such as ibuprofen and naproxen are already known to raise people’s risk of a heart attack. Now a new study shows the risk comes within the first week of using the drugs.

The study doesn’t mean that everyone should avoid taking the pills to treat headaches, lower fevers and reduce aches and pains, but does suggest people who know they have a bigger-than-average heart attack risk should avoid long-term use and high doses, the researchers said.

Ibuprofen NBC News

The study involves drugs called nonsteroidal anti-inflammatory drugs or NSAIDS for short. They include ibuprofen, sold under brand names like Advil or Motrin; naproxen, like Aleve; as well as prescription arthritis drugs known as COX-2 inhibitors, such as Celebrex.

Tylenol, known generically as acetaminophen, is not an NSAID. The researchers did not look at aspirin, another NSAID commonly prescribed to lower heart attack risk that works in a slightly different manner.

The study also looked at Vioxx, a prescription drug pulled from the market in 2004 after it was shown to raise the risk of strokes and heart attacks.

Related: One Arthritis Drug As Good, or Bad, as the Others

Michèle Bally of McGill University and colleagues pooled all the studies they could find on NSAIDs and heart attacks. They settled on data covering 446,000 people using NSAIDs, including 385,000 who did not have heart attacks, known medically as myocardial infarctions.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“By studying 61,460 myocardial infarction events in real-world use of NSAIDs, we found that current use of a NSAID is associated with a significantly increased risk of acute myocardial infarction,” they wrote in their report, published in the British Medical Journal.

Related: FDA Strengthens Safety Warnings on NSAIDs

The risk started within a week and it did not grow with longer use, they found. But the study doesn’t show just how much someone's risk of having a heart attack is increased.

“This was observed for all traditional NSAIDs, including naproxen,” they added.

Using more than 1,200 mg a day of ibuprofen and 750 mg a day of naproxen was especially dangerous, they found. As expected, Vioxx was especially dangerous.

"For most people who are not at high risk of a heart attack these findings have minimal implications."

The U.S. Food and Drug Administration already added so-called black box warnings to NSAIDs warning people with heart disease or high blood pressure to avoid using them without checking with a doctor first.

Related: Common Painkillers Linked to Heart Attack Risk

The American Heart Association advises people to try acetaminophen (Tylenol) first.

It’s tough news for people with chronic pain — they are already told to avoid stronger drugs such as opioids because of the risk of addiction and overdose.

“A particularly difficult decision will be in patients with inflammatory arthritis — such as rheumatoid arthritis — as they often need NSAIDs to damp down the inflammation to control pain and stiffness in the joints,” said Dr. Mike Knapton, Associate Medical Director at the British Heart Foundation, who was not involved in the study.

But Stephen Evans of the London School of Hygiene & Tropical Medicine, said the occasional user has less to worry about. “The two main issues here are that the risks are relatively small, and for most people who are not at high risk of a heart attack these findings have minimal implications,” Evans said in a statement.

The study does not show how the drugs may cause heart attacks. There are several theories on how that might happen.