U.S. researchers say they have found a way to create a new rat heart by using the structure of the heart of a dead rat and injecting it with stem cells from newborn rats.

It's a feat that could one day lead to customized organs for humans -- though that could be many years away.

While there have been advances in generating living heart tissue in the lab, this is the first time an entire, three-dimensional heart has been brought to life.

In a study that appeared Sunday in the journal Nature Medicine, Dr. Doris Taylor of the University of Minnesota Center for Cardiovascular Repair describes the procedure she used, called decellularization.

Taylor says decellularization has already been used in making heart valves and blood vessels and decided to try it on whole organs.

Using the procedure, Taylor's team removed all the cells from a dead rat's heart, using powerful detergents, leaving only the organ's collagen structure intact.

They injected this "scaffold" with heart cells from newborn rats, because newborn cells are heartier than adult cells, says Taylor. They then fed the cells a nutrient-rich solution and left them in the lab to grow. Four days later, the heart cells started to contract.

"When we saw the first contractions, we were speechless," said Harald Ott, a surgeon at Massachusetts General Hospital who worked with Taylor.

As the new hearts developed, the team coaxed them along by stimulating them with electrodes to synchronize the heartbeats. They also hooked up the hearts to a pump so they were being filled with fluids. Eight days later, they had eight hearts beating normally enough to pump fluid out the aorta.

When stimulation was stopped, the hearts continued beating for various amounts of time on their own. The best-performing hearts were kept beating for 40 days.

Taylor is now hopeful the same technique might be useful in re-engineering other organs damaged by disease.

The ultimate goal of the process would be to take a patient's injured organ and use their own stem cells to regenerate tissue -- a process that should avoid the problem of rejection of foreign tissue.

But scientists say that dream is still a long way off.

"This is an ingenious step towards solving a massive problem," Dr. Tim Chico of Britain's University of Sheffield said in a statement.

"This study is very preliminary, but it does show that stem cells can regrow in the 'skeleton' of a donor heart."