(CNN)A baby born with her heart outside her body has survived surgery to insert it back into her chest.
Vanellope Hope Wilkins, now three weeks old, was delivered by a team of 50 medical professionals at Glenfield Hospital in Leicester, UK, on November 22.
Born with ectopia cordis, a rare congenital condition causing her heart to grow outside her body, the baby girl underwent three intensive surgeries to put her heart inside her chest. She is now on the road to recovery.
"I had prepared myself for the worst; that was my way of dealing with it. I had brought an outfit to hospital that she could wear if she died," said Naomi Findlay, Vanellope's mother, in a statement on Tuesday. "I genuinely didn't think my baby would survive, but the staff at Glenfield have been amazing."
"I deal with babies with heart problems all the time, some of them very complicated," said Dr. Frances Bu'Lock, consultant in pediatric cardiology at Glenfield Hospital.
"This is only the second case in 30 years that I've seen this particular condition, it's extremely rare," she said. "Vanellope is the first baby to survive this operation in the UK."
Odds stacked against them
An initial ultrasound scan at nine weeks had alerted Vanellope's parents, Naomi Findlay and Dean Wilkins, that their baby's heart and part of her stomach had begun to grow outside of her body.
Bu'Lock did Naomi's ultrasound at 16 weeks, and found that while Vanellope's bowel had moved back to the correct position, her heart was still out of place.
A blood test confirmed that the risk of other chromosomal abnormalities was low, at which point Naomi and Dean chose to fight for their daughter's life.
Bu'Lock did not expect the baby to survive, she said. "There were so many difficulties -- she might have other body organ problems. The chances against her surviving at that stage was huge."
In most cases, the malformation is detected in the womb and the pregnancy is terminated or results in a stillbirth. A successful delivery also brings a very high risk of infection or associated defects, according to the hospital.
Naomi and Dean received counseling throughout the process.
Surgeons deliver miracle
Four teams of doctors at Glenfield -- which is part of the UK's National Health Service (NHS) -- were scheduled to deliver the baby on November 22 by caesarean section to reduce the risk of infection as well as the risk of injuring the infant heart.
After birth, Vanellope was placed in a sterile plastic bag to reduce infection risk to her heart and keep exposed tissues moist.
"Vanellope was born in good condition. She cried at birth and coped well with the early stabilization and her heart continued to beat effectively," said Glenfield Consultant Neonatologist Jonathan Cusack.
""At around 50 minutes of age, it was felt that Vanellope was stable enough to be transferred back to the main theater where she had been born to the waiting anesthetists, congenital heart disease and pediatric surgical teams who began the task of putting her entire heart back inside her chest," he said.
While the defect in Vanellope's chest was small, the surgeons were concerned about repositioning the heart correctly to ensure it was properly attached to the veins and arteries.
"Now she's out, she's had three surgeries and her heart is covered -- I think her chances are a lot better," said Bu'Lock, who called the surgery "challenging (rather) than complicated."
"Cases of ectopia cordis are extremely rare but Vanellope's situation is even more unusual," said Dr. Martin Ward-Platt of the Royal College of Paediatrics and Child Health, who was not involved in the procedure. "Usually babies like Vanellope are born with a number of other complications of the heart or other organs, but from the media reports it seems this could be the only abnormality -- which makes it even more rare."
Heart out of place
Ectopia cordis, literally translating to "out-of-place heart," is a heart abnormality that develops during the early stages of development in the womb.
The condition causes the heart to form either partially or wholly o