Edita Tracey considers herself and her baby very lucky. That’s because the 35-year-old woman was diagnosed with a potentially deadly heart condition while she was 36 weeks pregnant.

ABC News reports that near the end of her pregnancy Tracey experienced some back pain and tiredness – not unusual symptoms for expectant mothers.

Tracey reported the back pain to her doctor, who discovered that she had a condition called aortic dissection. Due to high blood pressure, Tracey’s aorta was rupturing.

Tracey was admitted to the hospital immediately for back-to-back surgical procedures. The first was a Cesarean section, in which doctors delivered a healthy baby girl in just 30 seconds. With Tracey’s life in the balance, there was no time to waste. Tracey underwent open-heart surgery just after giving birth. The procedure to repair her ruptured aorta took nine hours.

When Tracey woke up she was relieved to find that both procedures had been successful. Mother and baby have since been discharged from the hospital.