Scientists have successfully repaired damaged monkey hearts by injecting new heart cells made from human stem cells, paving the way for a trial in humans before the end of the decade.

Researchers now hope that the treatment could give patients a new lease of life after massive heart attacks that cause scarring and ultimately heart failure.

"When human embryonic stem cells were first discovered, this is just the sort of therapy people hoped they would lead to. We are optimistic, but we are also cautious," said Charles Murry, who led the team at the University of Washington in Seattle.

The heart is one of the poorest organs in the body at repairing itself when it sustains damage. After a heart attack, muscle tissue in the heart dies off, and is replaced a month or so later with scar tissue. This does not contract like normal heart tissue, so the heart is weakened and struggles to pump blood around the body.

More than 100,000 people have heart attacks in Britain every year, and one in three dies before reaching hospital. Serious heart attacks are responsible for 750,000 people living with heart failure in the UK. But the successful trial heralds the possibility of a new approach: "We think we can do our first patient in around four years in a phase-one trial," Murry said. The study is reported in the journal Nature.

Studies in mice and rats have previously shown that injections of stem cells can help to repair damaged heart muscle, but those animals have substantially different physiology and heart rates to humans.

Sian Harding, director of the British Heart Foundation cardiovascular regenerative medicine centre at Imperial College London, called the work a big step forward.

"This is as close as you can get to putting these cells into humans. It's really important, because this is looking at a large amount of muscle, and that has not been done before. It's what you are going to need in humans," Harding said. "It shows us you can make the muscle, keep it there, get the blood vessels in, and have it work even at high heart rates."

Murry's team tested the procedure in four pig-tailed macaques and found that the cells helped to repair heart tissue damage. The researchers induced minor heart attacks in the monkeys by blocking a heart blood vessel for 90 minutes.

During the next two weeks – before scar tissue had time to form – they injected one billion young heart cells created from human embryonic stem cells into and around the damaged heart muscle. The animals were given drugs to stop their immune systems rejecting the cells.

Most of the injected cells – around 90% – died off. But the remainder grew into fresh heart muscle that started to work with the animals' remaining healthy heart tissue. The cells formed connections with neighbours for passing electrical signals across, and blood vessels grew into the new tissue to supply it with oxygen and nutrients.

But the procedure did not go entirely smoothly. All of the monkeys that received human heart cells developed irregular heartbeats, or arrhythmias, which lasted for two to three weeks. Though none of the animals died from the arrhythmias, the problem will make researchers wary of transplanting the cells into humans.

The cells probably caused irregular heartbeats because they were immature when they were injected. As the cells matured in the animals, the arrhythmias subsided, Murry told the Guardian.

"If we did this in patients there would be a vulnerable period of a few weeks and they would stabilise after that, but we would prefer to solve the problem before we treated patients," Murry said.

Murry said that around a quarter of the heart muscles was damaged in the monkeys his team treated. Had they caused much more damage the monkeys may have died before the scientists had had a chance to inject them with fresh heart cells.

Harding added that instead of injecting the heart cells, another option might be to make grafts of heart cells in the lab and transplant them as a sheet of tissue. These could sit over scarred heart tissue, and help the heart to pump more strongly.

John Martin, professor of cardiovascular medicine at UCL, was cautious about the study because it failed to show whether the transplanted cells improved the function of the monkeys' hearts. The occurrence of arrhythmias was worrying too, he added.

Anthony Mathur, director of cardiology at Barts Health NHS trust, is working with Martin on a trial that will see 3,000 heart attack patients across Europe infused with stem cells taken from their own bone marrow. While the cells do not gather in the heart and make fresh muscle tissue, they do release chemicals that reduce damage and potentially help the heart to recover. One advantage of the procedure is that patients do not need to take anti-rejection drugs, because the cells are their own.

Peter Weissberg, medical director at the British Heart Foundation, said: "This research brings us one step closer to repairing a damaged human heart, but we still have some way to go until we reach our goal."