The finding is somewhat surprising, given the fact that strong coffee can cause palpitations, but it underlines the complex nature of coffee's effect on the body.

A study of 374 patients who had a heart attack or other acute coronary event found those with normal blood pressure drinking one or two coffees a day were 88 percent less likely than non-coffee drinkers to develop a condition in which the heart fails to pump blood effectively.

So-called left ventricular systolic dysfunction (LVSD) is a common precursor of heart failure.

The protective effect, however, was not seen in patients with high blood pressure, where coffee drinking was actually associated with an increased likelihood of developing LVSD.

Coffee contains several biologically active compounds, which may have either beneficial or harmful effects on the cardiovascular system, said investigator Christina-Maria Kastorini.

On the plus side, it is a rich source of chlorogenic acid and antioxidants, which are thought to be protective, but in people with hypertension its bad effect on blood pressure appears to cancel this out.

The research, by a team at Harokopio University and the Hippokration Hospital in Athens, Greece, was presented at a European Society of Cardiology meeting in Prague.