Well that was lucky.

A Qatar Airways flight from Doha, Qatar to Bangkok, Thailand, was in for a shock when a passenger onboard went into labor. Fortunately, a doctor who was on the flight helped ensure a smooth delivery.

AIRLINE PASSENGER FORCES WESTJET PLANE BACK TO TORONTO WITH CORONAVIRUS CLAIM

Dec. 22, 2014: An Airbus A350 XWB is pictured on the tarmac during the first delivery of this new passenger jet at Qatar Airways in Toulouse, southwestern France.

A Qatar Airways flight from Doha, Qatar to Bangkok, Thailand, was in for a shock when a passenger onboard went into labor Tuesday. (Reuters)

Alena Fedchenko was on the flight when the crew announced that they were looking for a doctor, BBC reported.

Fedchenko, an ear, nose and throat doctor in the Ukraine, volunteered and was reportedly taken to the flight attendant’s room, where a Thai woman was lying on blankets on the floor in labor.

Fedchenko immediately put on gloves and prepared the woman for what turned out to be a quick delivery.

CLICK HERE TO GET THE FOX NEWS APP

"The delivery was quick, and thankfully, without complications," Fedchenko told BBC. "The woman did not yell at all. I kept telling her everything would be all right, that I was a doctor and she was in safe hands."

The baby boy was born within 20 minutes of the time Fedchenko arrived to help.

Despite Qatar Airways’ policy that restricts “expectant mothers who are pregnant from their 36th week or beyond” to fly, Fedchenko said the baby did not appear to be premature and was healthy.

CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER

The pilot made the decision to land early in Calcutta, India, so the mother and newborn could deplane and go to a hospital.

The flight reportedly took off for its final destination in Bangkok after a long delay in India.

As for Fedchenko, she told BBC she was thanked profusely and upgraded to business class for her help.

A spokesperson for Qatar Airways was not immediately available to provide comment, but on the airways’ official Twitter account said it was “delighted to welcome a new member on the flight.”

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

And apparently there is an open invitation for the little one to rejoin the airline “in 20 years time.”