The parents of a six-year-old girl, given a new heart when she had only a few hours to live, had said goodbye to her three times before the operation.

Jon and Bridget Slater said yesterday the prognosis was so bad they had stood at her bedside, where she lay clutching her teddy, and whispered their goodbyes, expecting never to see her alive again.

Sally, who had a seven-hour operation early on Sunday, is "still poorly but improving", said a spokesman for the Freeman Hospital in Newcastle upon Tyne.

Doctors said they had used a revolutionary new artificial heart to keep her alive while they waited for a donor. Leslie Hamilton, the children's surgeon who fitted the device, said it was the sixth time the £40,000 "plastic heart" had been used in the UK and only the second time on a child. The transplant was performed by the heart surgeon Asif Hasan.

Sally, who has two brothers, Joe, five, and Charlie, three, was fit and healthy until she succumbed to a mystery virus that attacked the muscles of her heart three weeks ago.

A donor was found after a desperate appeal from her parents. Mr Slater, an independent financial adviser, said yesterday that he and wife were cautiously optimistic about Sally's future. "We have basically said goodbye to her three times in the past three weeks. We don't know whether she was sufficiently conscious to know what we have been saying," he said. "We thought we would never see her again. It is a fairly emotional time, but after each of those times we are still here and still hanging on. At present, it is difficult not to get too optimistic. We have been on such a tide of emotion and a rollercoaster over the last few weeks."

The Slaters again thanked the anonymous heart donor and urged people to think more of donating organs.

A campaign has started to change the system of donation where people carry cards agreeing their organs can be used. The proposal is that those who did not want to give organs would carry a card stating that, and everyone else would be assumed to be a willing donor.

Mr Slater said: "To me, it is a far more sensible way of doing things, if your views are strong enough and you really don't want to do it. There are a lot of people in a grey area who aren't really bothered either way, but if it has already been sorted out by opting out it is a better way than the present system.

"There are going to be children and adults until the end of time who are going to need transplants, and there is no use having these doctors and surgeons who can perform miracles when there aren't the organs to put in."

Mr Hamilton said the girl's condition was very rare, and doctors may never know what had happened to her heart. "It is the first time we have successfully used this temporary artificial heart to support someone for a heart to become available. It is very new technology. Basically, it's an artificialplastic pumping chamber, which mimics the two chambers of the heart.

"It is fortunately rare that children need transplants. We know there are enough donors for children - it is just the timing is not always right and that was the idea for putting her on the artificial machine."

Sally is expected to remain in intensive care for several days, depending on her rate of recovery. Then she will be in hospital for up to six weeks before she will be allowed home.