Drinking large amounts of coffee each day could increase the risk of heart attack for people with a particular genetic profile, a study has suggested.
'Heavy' coffee drinkers are those who drink around four cups a day
Four thousand people in Costa Rica were monitored in the Journal of the American Medical Association study.
Those who were slow at breaking down caffeine were 64% more likely to suffer a heart attack.
But British experts said other factors, such as smoking, had more impact on the heart than the "odd cup of coffee".
Researchers from the University of Toronto looked at 2,014 men and women who had had a non-fatal heart attack between 1994 and 2004 and compared them with the same number of healthy people.
The team wanted to look at the effect of caffeine in particular to see if it alone was linked to the development of cardiovascular diseases, or if other chemicals in coffee were implicated.
Caffeine is metabolised mainly by an enzyme called cytochrome (CYP1A2) in the liver.
Variations of the gene which control the action of this enzyme can slow or quicken the speed at which the body processes caffeine.
Genetic tests were used to determine which variation of the gene the participants had. They were also asked about their coffee consumption.
Carriers of the 'slow' form of the gene who drank two to three cups of coffee a day had a 36% increased risk of heart attack, compared to those who drank less than one cup a day.
Drinking four cups or more increased heart attack risk by 64%.
The increased risk was particularly evident in people under 50.
But those with the 'fast' gene had a lowered heart attack risk if they drank up to three cups a day. However. the difference disappeared if they consumer more.
Dr Ahmed el-Sohemy, from the University of Toronto, told The Times newspaper: "It appears that one cup a day is not associated with any harm, regardless of your genetic make-up.
"There may be some people in the population for whom several cups a day may not be harmful, but until such exceptions have been identified, moderation would appear to be best."
Professor Peter Weissberg, medical director at the British Heart Foundation, said: "We know that the speed at which people break down different drugs varies from person to person, depending on their genetic make up.
"This research suggests that heavy coffee drinkers who break down caffeine more slowly may have a slightly increased risk of having a heart attack.
"However, for most people other lifestyle choices, such as smoking, diet and exercise, are far more likely to affect their heart health than the occasional cup of coffee."
A spokesman for the British Coffee Association said: "This study is very interesting, but its findings are limited to the specific sample studied.
"For the general population, we would say coffee drinking in moderation is perfectly safe."