Amanda Hess M.D. and her newborn daughter. (Frame grab via NBC News)

A Kentucky-based doctor who was in the hospital preparing to give birth put her own delivery on hold to deliver another woman’s baby after hearing that the child was in distress.

Amanda Hess, an obstetrician-gynecologist from Frankfort, checked into the Frankfort Regional Medical Center as a patient last week, donned a hospital gown and was moments away from induced labor when she heard a woman in another room wailing in pain, NBC News reported Saturday.

The woman was Leah Halliday Johnson, a pregnant mother who happened to be one of Hess’s patients. Just the week before, she had seen Hess during her final prenatal appointment, according to NBC.

Nurses told Hess that Halliday Johnson’s baby was coming far faster than expected and that the umbilical cord was wrapped loosely around the child’s neck, Halliday Johnson told People.com Sunday. The on-call doctor had left the hospital for a break, and they needed immediate help.

That’s when Hess jumped in.

“I just put on another gown to cover up my backside and put on some boots over my shoes, to keep from getting any fluid and all that stuff on me, and went down to her room,” Hess told WKYT.

“I had actually taken a call the day before, so I thought really that I was working up to the last minute,” she added in an interview with LEX 18. “But this was literally ’til the last second.”

“I said you know, I’m not on call, I’m here in a gown, but I think we ought to have the baby,” she said.

Nurses had been urging Halliday Johnson not to push, but the pain was getting worse, she told People.com on Sunday.

“I was not being quiet about the fact that it was difficult for me not to push,” Halliday Johnson said.

When Hess came in, Halliday Johnson didn’t realize the doctor was about to enter labor herself.

Hats off to this #DrMom and member of Physician Moms Group #PMG, Dr. Amanda Hess! This picture was taken minutes after…

Posted by Dr. Hala Sabry on Tuesday, July 25, 2017

“She was definitely in doctor mode,” Halliday Johnson told NBC. “My husband noticed something was going on because she had on a hospital gown, but I didn’t notice that because I was on the delivery table. I was in my own world there.”

Halliday Johnson gave birth to a baby girl, according to NBC.

“She was just glad to be able to get to push and have the baby out and not have to wait any longer,” Hess told WKYT.

Shortly after, the on-call doctor arrived and took over. Her work in Halliday Johnson’s room done, Hess went back down the hall. Later that night, she too gave birth to a baby girl.

“Pretty amazing what she did,” Halliday Johnson told Lex 18. “I feel very lucky she was there and the type of person she is and step up to do what she did. We really appreciate her.”