The death of a significant other may actually break your heart, new research suggests.
People who lose a partner are at an increased risk of developing an irregular heartbeat, the new study has found.
The condition, known as atrial fibrillation, is itself a risk factor for stroke and heart failure.
Researchers said the risk appears to be greatest in younger people after the death of their loved one.
The risk also increases when loss is least expected, they added.
Danish researchers collated data from almost 89,000 people diagnosed with atrial fibrillation between 1995 and 2014 and compared it to 886,000 healthy people.
Some 17,478 of those diagnosed with atrial fibrillation had lost their partner as had 168,940 of the comparison group.
After taking into account a number of factors, the researchers calculated that the risk of developing an irregular heartbeat for the first time was 41% higher among those who had been bereaved.
The study, published in the journal Open Heart, found that the risk was highest eight to 14 days after the loss, after which it gradually declined. A year after loss a bereaved person's risk is the same as someone who has not suffered such a loss, they found.
Bereaved people under the age of 60 were more than twice as likely to develop atrial fibrillation if they had suffered a loss.
Risk was also heightened when the partner's death was deemed to be unexpected - those whose partners were relatively healthy in the month before death were 57% more likely to develop an irregular heartbeat.
The authors cautioned that no cause and effect can be inferred from the observational study but said that bereavement is known to increase the risk of cardiovascular disease, mental illness, and even death.
Acute stress may disrupt normal heart rhythms and prompt the production of chemicals involved in inflammation, they suggested.
"The loss of a partner is considered one of the most severely stressful life events and is likely to affect most people, independently of coping mechanisms," they wrote.
"In this large population-based study, the severely stressful life event of losing a partner was associated with a transiently increased risk of atrial fibrillation, which lasted for about one year.
"The elevated risk was especially high for those who were young and those who lost a relatively healthy partner.
"Bereavement is a major life event, which is known to increase the risk of cardiovascular disease, mental illness and death.
"The underlying causal mechanisms for the association between the loss of a partner and AF is unclear, but acute stress may possess direct arrhythmogenic properties by alternating autonomic control, influencing heart rate variability and enhancing proinflammatory cytokines."
Maureen Talbot, senior cardiac nurse at the British Heart Foundation, said: "The bereavement of a partner is a devastating event in anyone's life but the effect can be even worse when a death is sudden or premature.
"Our research has shown how emotional stress can have an adverse effect on the heart but this study also highlights a significant physical effect - a greater risk of developing atrial fibrillation when recently bereaved. This risk appears even greater the more sudden the death or younger that person is.
"Studies to increase understanding of the cause of this finding are needed but it is important to ensure the newly bereaved, regardless of their age, are monitored and supported by their loved ones and to see their GP if they experience any symptoms."