This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A woman on a flight from San Francisco to Phoenix got an unexpected surprise Tuesday morning when she went into labor and had to deliver her baby shortly after takeoff, forcing the plane to divert to LAX, according to Southwest Airlines.

“It was amazing,” a flight attendant said in a video provided by Southwest. “All the passengers were awesome. Everybody was clapping.”

According to flight records, Southwest Airlines Flight No. 623 left San Francisco at 6:24 a.m. with the intention of flying to Phoenix, but was diverted to Los Angeles International Airport, landing at 7:38 a.m.

The woman gave birth “slightly” after takeoff while the plane was in the air, Southwest Airlines spokeswoman Emily Samuels said.

A nurse and doctor were coincidentally on the flight and assisted in the delivery and care of the mother and baby until flight crews landed the plane and paramedics could take over, Samuels said.

Federal air traffic controllers quickly cleared way for the plane to land in Los Angeles, Southwest pilot Capt. John Gordy said.

“It was like Moses parting the waters,” Gordy said.

Los Angeles Fire Department officials rendered immediate medical aid to the mother and newborn before any passengers exited the plane, LAFD spokesman Erik Scott said.

Both were transported to a local hospital in good condition, Scott said.

“LAFD praises an ER RN that assisted the mother in giving birth prior to our arrival,” Scott stated.

Passenger Julie Dafoe told Phoenix television station KTVK that there was no significant noise from either parent during the delivery. But another flyer said he heard the newborn cry out and learned of the birth from another passenger.

The captain announced the birth on the loudspeaker, congratulating the parents and prompting applause.

With a story to tell, the 111 passengers and five crew members continued on to Phoenix after a delay of about 2 1/2 hours, according to Samuels.

“I can’t think of anything else that’s going to top that,” Gordy said.

KTLA’s Jennifer Thang contributed to this report.