Grow-your-own pacemakers are a step closer to reality, after pioneering experiments in pigs.
Scientists turned heart cells into pacemaker cells by injecting a gene.
The "biological pacemaker" was able to "effectively cure a disease", said scientists from the Cedars-Sinai Heart Institute in Los Angeles.
The researchers injected a gene into pigs with a heart condition that causes a very slow heart rate.
The gene therapy converted some of the billions of ordinary heart muscle cells into much rarer specialised cells that kept the heart beating in rhythm.
The patch of cells the size of a peppercorn had acted as a pacemaker for two weeks, taking over the function of a conventional pacemaker, said the US team.
"We have been able, for the first time, to create a biological pacemaker using minimally invasive methods and to show that the biological pacemaker supports the demands of daily life," said Dr Eduardo Marban, who led the research team.
"We also are the first to reprogram a heart cell in a living animal in order to effectively cure a disease."
Conventional pacemakers are electronic devices that are implanted into the chest to control an abnormal heartbeat.
The pacemaker sends regular electrical pulses to keep the heart beating regularly.
Scientists are working on creating biological pacemakers that might one day be used in their place, either as a temporary or more permanent measure.
"Babies still in the womb cannot have a pacemaker, but we hope to work with foetal medicine specialists to create a life-saving catheter-based treatment for infants diagnosed with congenital heart block," said co-researcher Dr Eugenio Cingolani.
"It is possible that one day, we might be able to save lives by replacing hardware with an injection of genes."
But the British Heart Foundation said this was a long way off.
Pacemakers had been around since the early 1960s, and while technology was constantly improving, researchers were looking ahead to a day when perhaps an implantable device might not be needed for some patients, said senior cardiac nurse Amy Thompson.
"However, it is a long way off yet and the benefits of a pacemaker are usually outweighed by the risks," she added.
"This study is an interesting contribution to this area of research, however it was quite small and only lasted two weeks.
"Pacemakers continue to be an important treatment for many abnormal heart rhythms, helping to keep hearts beating and save lives."