A new mom nearly died after her unborn baby kicked her so hard, her tiny legs tore through the wall of her mom’s womb, doctors have revealed.

They faced a race against time to deliver the baby girl via emergency C-section after the powerful lunge left the mom bleeding and her baby at risk of a life-threatening infection.

The mom, known only as Zhang, was 35 weeks pregnant when she suddenly started suffering stomach pain in the early hours of Oct. 2.

Initially, she put it down to an upset stomach, but it soon got worse and she began to break out in a cold sweat.

At 10 a.m., she went to the emergency department at Peking University Shenzhen Hospital in China, according to the hospital’s social media page.

She was complaining of extreme pain and doctors noted problems with her blood pressure, pulse and breathing.

Specialists initially suspected her womb had ruptured and performed an ultrasound.

It showed that the fetus’ leg had “kicked through” the uterus wall into the mom’s abdominal cavity and her thighs were stuck, according to doctors.

Within five minutes, doctors rushed the woman into the operating room, fearing she could suffer dangerous internal bleeding and go into shock.

And her unborn baby was at risk of a life-threatening infection because of the ruptured womb wall.

Surgeons Zhang Lei, Zhang Yanping and Zhong Shilin safely delivered the baby girl in just 10 minutes, fearing she could have been stillborn.

They discovered blood in the mom’s stomach and a 7-centimeter (2¾-inch) “break” in her womb wall.

Zhang’s medical history revealed she had undergone an operation to remove fibroids from her womb in 2016.

As a result, she had an old wound scar in her uterus wall, which had left a weak spot.

Doctors said mom and baby are both doing well after the little one’s traumatic arrival in the world.

A rupture of the uterus during pregnancy is a very rare complication but can prove life-threatening.

They typically happen at the site of an old C-section scar.

A complete rupture, where the tear goes through the entire womb wall, can be extremely dangerous.

Most uterine ruptures will happen when a mom is already in labor, but they can happen before that — as in Zhang’s case.

As well as C-sections, moms who have previously had surgery to remove fibroids or to correct a misshapen womb are also at greater risk of the complication.

These moms-to-be should speak to their specialists about giving birth and many will be scheduled for C-sections.