In many cases, replacing damaged joints gives people with osteoarthritis a dramatically improved quality of life – with reduction or even elimination of pain and improved mobility. But a new study found that hip and knee replacement surgery may boost the risk of heart attack during the early recovery period.

“We found that total hip and knee replacements substantially increase the risk of heart attack during the first two weeks, in particular in patients older than 60,” says lead study author Arief Lalmohamed, a researcher in the department of pharmaceutical sciences at Utrecht University in the Netherlands. “We learned from this study that we need to focus more on preventing cardiac outcomes following this major surgery.”

The study, which appeared in the Archives of Internal Medicine, relied on national registry data on about 95,000 Danish patients who underwent total hip replacement or total knee replacement surgeries between 1998 and 2007. The average age of the hip patients was 72, while the average age of the knee patients was 67. The researchers found that during the two weeks immediately following each surgery, heart attack risk rose sharply – 25-fold for hip patients and 31-fold for knee patients, compared with similar people in the Danish registries who did not have these surgeries.

After two weeks, heart attack risk dropped dramatically – although the overall risk of heart attack after hip replacement surgery remained elevated for six weeks. Researchers also found that the association between hip and knee replacement surgeries and heart attack was strongest in those 80 years or older. They found no significantly increased risk in patients younger than 60.

This study adds weight to previous research suggesting that certain groups are at increased risk of heart trouble following joint surgery. For example, a study in Annals of the Rheumatic Diseases in 2011 found an increased risk for cardiac complications following joint replacement surgery in older patients and in those who had pre-existing heart disease, deep vein thrombosis or pulmonary embolism.