The 6.2-magnitude quake that struck just before midnight on Monday killed over 100 people in the provinces of Gansu and Qinghai, injured nearly 1,000 and left survivors facing months of uncertainty ahead without permanent shelter.

Many of the affected families are Hui people, a tight-knit ethnic minority characterised by its distinctive Muslim identity, mostly found in western Chinese provinces and regions such as Gansu, Ningxia and Shaanxi.

"The four of us were sleeping together when the house collapsed," Ma's grieving grandmother Ga Fengmo told Reuters. "I couldn't even put on my prayer hat or shoes. I immediately went looking for help.

Ma was rushed to the nearest medical facility but succumbed to her injuries en route, and the Hui community in Yangwa - in Gansu province, the hardest-hit region - came together to mourn the loss of one of their own.

"There was no solution. They tried to take her to the hospital, but she passed away halfway on the mountain road. The mountains are too high and the hospital is too far away. There was just no way they could get to the hospital in time," said Ma's grandmother.

Ma Meidong, the imam of the community, told Reuters of the challenges faced during rescue efforts.

"Four people in their family were trapped by the collapsed house. We tried our best to dig out the soil with our hands. The other three people were rescued, and only one person died."

As the villagers grapple with the aftermath, they now face a harsh winter without permanent shelter in sub-zero cold.

"We are all farmers. We rely on our hands to grow crops or do business to support our families. As you can see, everything is gone overnight. We are heartbroken," Imam Ma said.

"Even though we say this, we believe in accepting what comes as part of our religious convictions. It is a test from above, and we must accept it."

In Gansu, more than 207,000 homes were wrecked and nearly 15,000 collapsed, affecting more than 145,000 people. More than 128,000 emergency supply items including tents, quilts, tent lights and folding beds have been delivered with food such as steamed buns and instant noodles provided to the victims.

(Reporting by Alessandro Diviggiano in Yangwa; editing by Mark Heinrich)

By Alessandro Diviggiano