The death of millions of people from sudden cardiac death could be prevented by a new drug, researchers believe.
Congenital conditions can disturb heart rhythms
A study on mice at the Columbia University showed it completely prevented sudden death in animals with the same defect as people with heart failure.
The drug tackled arrhythmias which have previously proved difficult to treat, Science magazine reported.
Heart disease experts in the UK said it was too early to say if the drug would work for patients.
Heart failure is not a heart attack but a weakening of the heart's ability to pump blood over a number of years.
About half of the 4.6million patients with heart failure in the US will die from a type of cardiac rhythm, or arrhythmia, that produces a fast and erratic beating of the heart.
The new drug is one of the first molecular-based therapies for heart failure and avoids the toxicity of current treatments which has led to many being removed from the market.
Other options, including defibrillators and heart transplants are highly invasive or expensive.
The new drug, code-named JTV519, tackles the molecular cause of dangerous erratic heart beats - the leakage of electrically charged calcium atoms, or
ions, into heart cells.
It uses a protein to plug the calcium leak. Ten mice with the defect thrived after receiving the drug and never developed an arrhythmia, while eight out of nine untreated animals died.
The drug could also prevent the relentless deterioration of the heart during heart failure, because the leak worsens the decline.
Dr Andrew Marks, at Columbia University's Center for Molecular Cardiology, said: "By fixing the leak, you could potentially slow the progression of heart failure and allow patients to live their lives more normally, not in and out of
"Our idea is to take a pill instead of spending hundreds of thousands of dollars on implants and heart transplants."
He added: "The drug will be an incredible advance if it works in patients.
"It represents the beginning of an era when drugs will directly fix the molecular defects in heart failure."
Dr Tim Bowker, associate medical director of the British Heart Foundation, said: "This study provides evidence which helps to identify a mechanism for electrical instability in the hearts of genetically modified mice.
"It has shown how a new drug might be used to help correct this mechanism. This may ultimately turn out to be of benefit in a relatively small, specific group of patients with inherited heart disease."
But he said that more than half the cases of heart failure in the UK are due to coronary artery disease.
Most of the rest are due to other recognised forms of heart disease, only a tiny proportion of which are thought to be electrical in origin.
Dr Bowker added: "Whether the new drug, which works in mice, will be of benefit in the prevention or treatment of heart failure in humans, remains to be proved."