Cardiologists in Los Angeles said Wednesday they have managed to create "biological pacemaker" cells that can restore heart rates.

A gene-therapy technique was used by the scientists in a study to turn working heart-muscle cells into cells that control a pig's heartbeat, according to The Verge. The technique allowed for heart rates to be restored for two weeks in pigs that often rely on mechanical pacemakers. The researchers said the procedure could lead to scientists developing therapies for people suffering from infections after a mechanical pacemaker implantation.

Eugenio Cingolani, a cardiogeneticist at the Cedars-Sinai Heart Institute and co-author of the study, said the procedure is practical because "no open-heart surgery is required to inject this gene."

The pigs in the study, which had complete heart block, were injected with a human gene called TBX18 in a small area in their hearts about the size of a peppercorn. The procedure was able to reprogram some of the heart-muscle cells in the pigs into cells that emit electric impulses and initiate heartbeats, which is not a function typically found in that area of the heart, The Verge reported.

The research team said the heart of a pig is very similar to the heart of a human, Fox News reported. The goal for the team is to use the technique to first help people with heart rhythm problems that can't use pacemakers because of infections or fetuses in the womb that have congenital heart block.

Eduardo Marban, a cardiologist at Cedars-Sinai and lead author of the study, said close to two percent of pacemakers result in an infection that needs to be treated. Almost 300,000 in the U.S. get pacemakers every year.

A common virus called an adenovirus was used to send the gene into the pig. The team said, however, that the virus doesn't possess any serious risks because they engineered it to "replication deficient" so it wouldn't reproduce and spread throughout the body, The Verge reported.

While the increased heart rates only lasted for the two-week period, the researchers said the therapy has the potential to last for longer periods of time.

"Based on the data showing in the paper or the unpublished results, we don't have any reason to believe ... that the two weeks is somehow a magic cap," Marban said.

The team is looking to conduct further animal studies to observe safety of the therapy and its long-term effectiveness, Fox News reported. Cingolani said if the therapy proves successful in the studies, "we hope to be able to begin trials in humans within three years."

The study was published in the journal Science Translational Medicine.