If you're at risk for heart attack or stroke, be careful how you use over-the-counter painkillers.

For instance, aspirin has long been known to be helpful in fending off heart attacks and strokes. But a new 10-year study of nearly 40,000 people, ages 50 to 84, found that those who suddenly stopped taking their daily dose had a 60% rise in their risk of having a non-fatal heart attack—regardless of how long they had been taking the drug. The study was done by researchers at the Spanish Center for Pharmacoepidemiologic Research and published in the British Medical Journal.

While stopping aspirin is risky, using another type of painkiller, non-steroidal anti-inflammatory drugs (NSAIDs) too much and for too long is risky, too. A recent study by University of Florida researchers, published in the American Journal of Medicine, showed that people with heart disease who frequently used NSAIDs upped their risk of heart attack or stroke by 47%. NSAIDs include ibuprofen and naproxen.

In light of this study, Howard LeWine, chief medical editor of Harvard Health Publications, advised those who are on NSAIDs for chronic conditions to talk to their doctors about using a lower dosage, or trying other painkillers, including aspirin, cautiously.