Urumqi, China: In the 50 hours she was trapped under rubble after last month's earthquake, mother-to-be Zhang Xiaoyan prayed hardest not for her own life but for her baby's survival.

On Wednesday she got her wish, giving birth to a healthy, pink-cheeked 3.3kg girl at the Urumqi Maternal Care Hospital in her home region of Xinjiang in China's far west.

Zhang's dramatic rescue was a rare bright spot after the May 12 earthquake centered in Sichuan province killed almost 70,000 people and left 5 million homeless.

The image of rescue workers pulling the eight-month pregnant Zhang onto a stretcher two days after the quake, her stomach protruding from under a blue sweater and pink pants, was played on TV screens and newspapers across the country.

"Even if I didn't make it, I just wanted my baby to survive. I was holding out hope during the earthquake that this day would come," Zhang, 35, said yesterday as she reclined in a hospital bed with her daughter swaddled in a pink floral blanket beside her.

She leaned over to kiss the baby she has named Ai, or love, in honour of the rescue workers and strangers who have showered her with kindness, gifts and VIP treatment in the month since she was pulled out of the debris.

The rescue of Zhang, along with her 63-year-old mother, from the collapsed ruins of a seven-storey apartment building in Dujiangyan set off celebrations among the rescuers.

The two had been trapped in about six metres of concrete slabs and other debris. Sun Guoli, the fire chief of Chengdu who was overseeing the operation, called it "a miracle of life, using one's life to save a life".

Watchers burst into cheers and applause when Zhang was pulled out and taken away in an ambulance.

A celebrity since her rescue, Zhang said she was grateful for all the care and attention she has received from the medical staff, who banded together to donate new sets of clothes and presents for her and the baby.