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

Rescuers used heavy equipment to dig through the debris of toppled buildings Tuesday, with weeping women crying out to God as bodies were recovered following a powerful earthquake on the border between Iran and Iraq.

The grim work began again at dawn in the Iranian town of Sarpol-e-Zahab, which was hit hard by Sunday night's magnitude 7.3 earthquake. It struck villages and towns in the mountainous area of Kermanshah province while many people were at home asleep.

Both rescuers and local residents alike stood atop the remains of apartments Tuesday, looking through the rubble. They used heavy blankets to carry away corpses.

Gallery: Deadly Earthquake Rocks Iran-Iraq Border

The quake killed 530 people in Iran and injured 8,000 others, state media reported Tuesday. Most of the injuries were minor with fewer than 1,000 still hospitalized, Iran's crisis management headquarters spokesman Behnam Saeedi told state TV.

Houses in Iranian villages are often made of concrete blocks or mud bricks that can crumble and collapse in a strong quake. Many of the heavily damaged complexes in Sarpol-e-Zahab were part of construction projects built under former hard-line President Mahmoud Ahmadinejad.

Saddam Hussein AFP - Getty Images, file

Sarpol-e-Zahab fell to the troops of Iraqi dictator Saddam Hussein during his 1980 invasion of Iran, which sparked the eight-year war between the two countries that killed 1 million people. Though clawed back by Iran seven months later, the area remained a war zone that suffered through Saddam's missile and chemical weapons attacks.

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

President Hassan Rouhani arrived in Kermanshah province on Tuesday to see the damage for himself and offer his support to those affected.

"This was a pain for all Iranians," Rouhani said, according to a statement on the presidency's website. "Representing the nation of Iran, I offer my condolences to the people of Kermanshah, and tell them that all of us are behind Kermanshah."

State television said thousands were huddling in makeshift camps while many others spent a second night in the open amid fear of more tremors after some 193 aftershocks. At least 14 provinces in Iran were affected.

A homeless young woman in Sarpol-e Zahab told state TV that her family was exposed to the night cold because of lack of tents.

"We need help. We need everything. The authorities should speed up their help," she said.

Iran's Foreign Minister Mohammad Javad Zarif offered his thanks to foreign countries offering to help but wrote on Twitter: "For now, we are able to manage with our own resources."

Iran's Red Crescent said a lack of water and electricity as well as blocked roads in some areas hindered aid supply efforts.

Earthquake survivors stand around the wreckage of a home in Sarpol-e Zahab, Iran, on Monday. Abedin Taherkenareh / EPA

The quake was centered about 19 miles outside the eastern Iraqi city of Halabja, according to the U.S. Geological Survey, and struck 14.4 miles below the surface, a somewhat shallow depth that can cause broader damage. The quake caused Dubai's skyscrapers to sway and could be felt 660 miles away on the Mediterranean coast.

Seven deaths occurred in Iraq and 535 people were injured, according to the country's Interior Ministry.

The disparity in casualty tolls immediately drew questions from Iranians, especially because so much of the town was new.

After the war with Saddam's Iraq, Iran began rebuilding Sarpol-e Zahab. It also was part of Ahmadinejad's low-income housing project, which aided the Holocaust-questioning hard-liner's populist credentials but also saw cheap construction.

Under the plan dubbed as Mehr or "kindness" in Farsi, some 2 million units were built in Iran, including hundreds in Sarpol-e Zahab. Many criticized the plan, warning that the low-quality construction could lead to a disaster.

Iran sits on many major fault lines and is prone to near-daily quakes. In 2003, a magnitude 6.6 earthquake flattened the historic city of Bam, killing 26,000 people.