Updated

Doctors in Canada are patting themselves on the back after what is believed to be a first-of-its-kind heart surgery that saved the life of an unborn child.

Halfway through her pregnancy, Kristine Barry of Barrie, Ont., learned her unborn son had a heart defect in which the two main arteries of his heart were reversed, reports the CBC.

Putting the aorta and pulmonary artery in their rightful places would require open-heart surgery after birth. But because Barry's unborn son also had no opening to allow blood to flow between the upper and lower chambers of his heart, he would be unable to circulate oxygen through his body once separated from his mother's placenta, with brain and other organ damage occurring within minutes.

NAVY SEAL EMBRACES WIFE FOR FIRST TIME SINCE TRAGIC ACCIDENT

More on this...

"He likely wasn't going to make it," Barry, 25, tells the Toronto Star. But doctors weren't about to give up. In what may be the first balloon atrial septoplasty performed on a baby in the womb, doctors from Mount Sinai Hospital and Sick Kids Hospital in Toronto used a needle to insert a balloon through Barry's uterus and into the boy's heart, opening a passageway between the chambers.

Five days later on May 23, Sebastian was delivered "all pink and screaming," rather than "blue and not vocal" as initially expected, Barry says. Two months after undergoing open-heart surgery to repair his heart defect, he's healthy and happy and Barry can't thank doctors enough.

"It's just amazing what they're able and capable of doing," she tells the Canadian Press. (Read about another heart surgery in the womb.)

This article originally appeared on Newser: In Possible World First, Heart Surgery Saves Baby in Womb