Common pain relievers like ibuprofen and naproxen — called nonsteroidal anti-inflammatory drugs, or Nsaids — are the go-to drugs for headaches and pulled muscles, arthritis and menstrual cramps. Their labels have long warned that overuse may increase the risk of heart attack and stroke, but we rely on them as we do on few other medications. And for good reason: They work.

Occasional use of Nsaids is not likely to lead to cardiovascular consequences. But an authoritative and ambitious new analysis that included data from over 600 trials, including detailed case histories of more than 350,000 patients, concludes that people who take high doses of Nsaids daily increase their cardiovascular risk by as much as a third, compared with those taking a placebo. The one exception is naproxen, which may actually have a protective effect against heart attacks.

The absolute risk of cardiovascular trouble for those who take high doses of other Nsaids regularly is still quite small. Nonetheless, the findings suggest that people who rely on them may want to explore alternative pain management methods, especially if they have other risks for heart disease, or a family history of it.

“There aren’t really good choices for chronic pain,” said Dr. Marie R. Griffin, a preventive medicine specialist at Vanderbilt University Medical Center who wrote a commentary on the new study, published last month in The Lancet. In addition to the potential harm, Dr. Griffin said, painkillers like Nsaids often don’t really do the job when it comes to chronic pain.

“If these drugs are making your life a lot better, that may be worth the risks,” she said. “But a lot of people will tell you, ‘I can’t tell if they’re doing anything, I just take them every day anyway.’ ” Nsaids include ibuprofen, sold under the brand names Motrin and Advil; naproxen, sold as Aleve, Naprosyn, Anaprox and Naprelan; and celecoxib, sold as Celebrex and available only by prescription.

Aspirin, also an Nsaid, is primarily used in low doses to prevent heart disease and was not included in the analysis.

The cardiovascular risks associated with Nsaids first came to light more than a decade ago when studies of drugs like Vioxx, Bextra and Celebrex found increased risks of heart attacks and strokes. Merck withdrew Vioxx from the market in 2004, and Pfizer withdrew Bextra a year later.

Since then, evidence has been gathering that nearly all Nsaids pose some cardiovascular risks in heavy users, said Dr. Garret A. FitzGerald, the director of the Institute for Translational Medicine and Therapeutics at the University of Pennsylvania and one of the new report’s authors. The consistency of the cumulative findings in genetic, mouse and human studies “is extremely rare,” said Dr. FitzGerald.

The analysis, financed by the Medical Research Council of the United Kingdom and the British Heart Foundation and published online on May 30, was five years in the making.

Diclofenac, which is not used much in the United States, and COX-2 inhibitors like celecoxib, marketed as Celebrex, account for three heart attacks and strokes a year on average — one of them fatal — among every 1,000 patients taking high doses regularly, the study found. Officials at Pfizer, which makes Celebrex, say it is not approved for use at doses higher than 400 milligrams a day, and they have maintained for years that it does not carry the same risks as other COX-2 inhibitors, an assertion that Dr. FitzGerald said “is not borne out by the data.”

Ibuprofen taken at high daily doses of 2,400 milligrams also significantly raised heart attack risk, possibly doubling it. But data about ibuprofen is scant, making it difficult to precisely assess the risk.

It may also be that ibuprofen dilutes the benefits of low-dose aspirin therapy among patients at risk for heart disease, Dr. FitzGerald said, but it was difficult to determine this without detailed information about patients’ use of aspirin.

For those who can tolerate it, the safest therapy appears to be naproxen. Even at high daily doses of 1,000 milligrams, naproxen does not increase cardiovascular risk and may actually have a protective effect similar to that of aspirin, the analysis found. Unfortunately, it also appears to cause more gastrointestinal problems than other Nsaids, while the COX-2 inhibitors like Celebrex generally seem to cause fewer such complications.

All Nsaids — including naproxen, which may protect against heart attacks — increase the risk of heart failure, the study found. Nsaids may also cause damage to the liver and kidneys and raise the risk of high blood pressure.

Still, some doctors worry that all the focus on cardiovascular risk will dissuade people who live with chronic, severe pain from taking advantage of treatments that, statistically speaking, are unlikely to cause them harm and can substantially improve their quality of life.

“People get very worked up about the cardiac risks, and they are real,” said Dr. Brian Walitt, a rheumatologist and associate professor at Georgetown University. “But these are population-wide risks. There are people with arthritis using these drugs every day, or most days, and most of them never have a problem.”

So how do consumers choose the right pain relievers? Here is some advice from the experts:

■ For people who can’t function without daily use of Nsaids, “our advice has always been, use the lowest dose you can for the least amount of time you can,” said Dr. Steven Nissen, chairman of cardiovascular medicine at the Cleveland Clinic.

■ If you have heart disease or risk factors for it, your doctor should assess the risk of chronic Nsaid use based on your personal medical and family medical history. A history of gastrointestinal problems should be part of the equation as well.