Maria Josefa Pingo Sanchez, 20, was rescued on Tuesday afternoon, and her baby girl came into the world about 3:50 p.m., 15 minutes before the helicopter touched down at a hospital.
The baby was named Cielo, "sky" in Spanish, according to state-run news channel TV Peru.
Mother and baby were lucky. The floods in Peru have claimed the lives of 106 people, government news agency Andina reported. Overall, more than a million people have been affected by the floods: Those include more than 361,981 children and 20,659 pregnant women.
Tenant Col. EP Edward Albuquerque Cordova, who rescued Pingo, said in a video released by the Peruvian Army that she had already been in labor for two days.
In the video, we see a towel draped over Pingo's knees and belly, and what looks like an army medic helping her through contractions.
"It was time. She wanted to be born midair," Pingo told Peruvian media at the hospital, grinning.
"She was in a precarious state of health," Albuquerque said, adding that the rescuers were not expecting Pingo to give birth before getting to a hospital, and that the birth was "improvised," but the baby's arrival brought joy to everyone in his crew.
"It was the first time this happened to me, and the first time it happened in an army helicopter, and in the army in general," Albuquerque said.
Pingo gave birth about 15 minutes before the helicopter reached its destination, a hospital in Chiclayo.
"What do we want the baby to be? A pilot, a soldier, or a commander? In any way, she is now a part of our family," Albuquerque said, smiling widely.
Mother and baby are doing well and on Thursday received a visit from the rescue unit's commander, Col. Javier Tryon, who brought her a gift. Pingo was so thankful to the Peruvian air force that she asked the unit commander to be baby Cielo's godfather, state-run TV Peru reported. Tryon said that it's the army's commitment to keep helping the Peruvian people.
Peru's Ministry of Foreign Trade and Tourism tweeted a photo of mother and daughter taken just minutes after the birth, with the caption "This is how hope is born."