Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SARPOL-E-ZAHAB, Iran — Karim and Fouzieh Yari were entertaining guests in their living room when disaster struck.

The room began to shake violently. The married couple sheltered under a doorway next to the central pillar of their house, waiting there until the convulsions stopped. They saw the stairwell had collapsed.

"We grabbed onto bits of metal sticking out of the walls, and we all managed to climb out of the building," Fouzieh said. "God did not want us to die."

The Yaris are among the thousands of Iranians whose lives were turned upside down by Sunday's 7.3-magnitude earthquake. It killed more than 500 people and injured nearly 8,000 others, according to state media.

Sarpol-e Zahab, one of the towns hardest hit by the earthquake, resembled the site of a bomb blast Wednesday.

The Yaris lost everything — even the certificate marking the marriage of their daughter. But as they huddled around a fire with their two children on Tuesday, they counted their blessings.

"The army keeps trying to give us tents and food, but my husband has too much pride," Fouzieh Yari said. "He keeps telling them to give it to other people because they need it more than we do."

Related: Earthquake Devastates Town Targeted by Saddam Hussein

Shirvali Ghadami and his family need all the help they can get.

Ghadami, a 56-year-old who works in agricultural management, lost his 70-year-old brother and 16-year-old nephew. His daughter lost three of her toes, and his sister-in-law's ribs were crushed.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

His family spent the night in tents just a few blocks away from the heap of rubble that used to be their house. The Ghadamis said they were still terrified by the aftershocks that rattle them every few hours.

Thousands of other people took refuge in similar makeshift encampments near roads and parks around this town. Others sat outside in the bitter cold, some guarding their belongings as though they feared the little they had left might be stolen.

Earthquake survivors sit next to the rubble of their homes in Kouik, Iran, on Wednesday. Atta Kenare / AFP - Getty Images

A man who identified himself as Hassan was found sitting next to a gutter, near the remains of his building.

He said he was one of the lucky ones in town. Hassan and his family survived the quake physically unscathed. All he had been able to salvage of his possessions, however, was a fridge and a few pots and pans.

A 23-year-old woman named Farank, who is three months pregnant, was trapped under the rubble of her two-story house for 16 hours.

Her husband, Peyman, started digging through the rubble with his bare hands before the military and rescue services could get to the site and help.

"He was a wonderful little boy, great at school, well-behaved"

Farank told NBC News she was convinced she wouldn't survive the ordeal. She says all she could do was pray.

Farank somehow managed to escape with just a few scratches and bruises.

Another local resident, who identified herself as Zhara, was out of town when the earthquake struck.

She returned to devastating news — her home was destroyed and her 7-year-old son was crushed underneath the rubble.

“He was a wonderful little boy, great at school, well-behaved,” Zhara said, adding that she had to bury the boy herself.

Meanwhile, rescuers continued combing through mountains of debris and recovering bodies on Wednesday.

Search crews and local residents stood atop the wreckage and used blankets to carry away corpses.

Earthquake survivors gather in Kouik, which is located near to Sarpol-e Zahab, on Wednesday. Atta Kenare / AFP - Getty Images

But amid the destruction and sorrow, there were signs of solidarity.

Many people across the region seemed eager to help their countrymen. People from as far as Tehran, around an eight-hour drive away, loaded up their cars with blankets, heaters, food and water, and then headed into the earthquake zone to help strangers.

Some came to the aid of residents of Quik, a village a few miles from Sarpol-e Zahab where close to 100 people died and nearly every house was destroyed.

The villagers told NBC News they were overwhelmed by the kindness of hundreds of people who streamed in Monday morning and offered whatever they could provide.

Karim Yari, a 52-year-old retired teacher, did not dwell on his misfortune. He seemed to look to the future with a mix of stoicism and practicality.

"If we can get a loan to rebuild our house, then we will," he said. "If not, we will go to a small village and rent something. That's life."

Ali Arouzi reported from Sarpol-e Zahab, Iran. Daniel Arkin reported from New York. Yuliya Talmazan reported from London.