TEHRAN, Iran (AP) -- A powerful 7.3 magnitude earthquake that struck the Iraq-Iran border region killed over 330 people in both countries, sent people fleeing their homes into the night and was felt as far west as the Mediterranean coast, authorities reported on Monday.
Iran's western Kermanshah province bore the brunt of the temblor, with Iran's state-run news agency reporting the quake killed 328 people in the country. State television said some 3,950 were injured. The area is a rural, mountainous region where residents rely mainly on farming to make a living.
In Iraq, the earthquake killed at least seven people and injured 535 there, all in the country's northern, semiautonomous Kurdish region, according to Iraq's Interior Ministry.
The magnitude 7.3 quake was centered 19 miles (31 kilometers) outside the eastern Iraqi city of Halabja, according to the most recent measurements from the U.S. Geological Survey. It struck at a depth of 23.2 kilometers (14.4 miles), a shallow depth that can have broader damage. Magnitude 7 earthquakes on their own are capable of widespread, heavy damage.
Iranian social media and news agencies showed images and videos of people fleeing their homes into the night. More than 100 aftershocks followed.
The quake's worst damage appeared to be in the town of Sarpol-e-Zahab in Kermanshah province, which sits in the Zagros Mountains that divide Iran and Iraq.
Kokab Fard, a 49-year-old housewife in Sarpol-e-Zahab, said she could only flee empty-handed when her apartment complex collapsed.
"Immediately after I managed to get out, the building collapsed," Fard said. "I have no access to my belongings."
Reza Mohammadi, 51, said he and his family ran out into the alley following the first shock he felt.
"I tried to get back to pick some stuff but it totally collapsed in the second wave," Mohammadi said.
Those in Sarpol-e-Zahab also said the power and water were out in the town as telephone and cellphone lines were spotty.
Iran's Supreme Leader Ayatollah Ali Khamenei offered his condolences on Monday morning and urged rescuers and all government agencies to do all they could to help those affected, state media reported.
The semi-official ILNA news agency said at least 14 provinces in Iran had been affected by the earthquake.
Officials announced that schools in Kermanshah and Ilam provinces would be closed on Monday because of the temblor.
In Iraq, Prime Minister Haider al-Abadi issued a directive for the country's civil defense teams and "related institutions" to respond to the natural disaster. Brig. Gen. Saad Maan, an Interior Ministry spokesman, gave the casualty figures for Iraq.
The quake could be felt across Iraq, shaking buildings and homes from Irbil to Baghdad, where people fled into the streets of the capital.
The Iraqi city of Halabja, closest to the epicenter, is notorious for the 1988 chemical attack in which Saddam Hussein's regime killed some 5,000 people with mustard gas — the deadliest chemical weapons attack ever against civilians.
Iraqi seismologist Abdul-Karim Abdullah Taqi, who runs the earthquake monitoring group at the state-run Meteorological Department, said the main reason for the lower casualty figure in Iraq was the angle and the direction of the fault line in this particular quake, as well as the nature of the Iraqi geological formations that could better absorb the shocks.
Turkey dispatched emergency aid to northern Iraq as officials expressed their "deep sadness" at the tragedy. Prime Minister Binali Yildirim said his country took immediate action to provide medical and food aid to northern Iraq.
Kerem Kinik, Turkish Red Crescent's vice president, told The Associated Press from Habur border crossing that 33 aid trucks were en route to Iraq's city of Sulaimaniyah, carrying 3,000 tents and heaters, 10,000 beds and blankets as well as food.
A Turkish military cargo plane arrived in Iraq as the official Anadolu news agency reported multiple dispatches by Turkey's disaster agency. Ankara also said it would help Iran if Tehran requests assistance.
Relations between Iraq's semi-autonomous Kurdish region and Turkey were strained following the Iraqi Kurds' controversial September independence referendum.
Meanwhile, Pakistan's government also extended its deepest condolences for the loss of life and injuries suffered by "our Iranian and Iraqi brethren."
Foreign Minister Khawaja Muhammad Asif said Pakistanis' "thoughts and prayers are with the Iranian and Iraqi brothers who lost their lives in this tragic calamity and we pray for the speedy recovery of the injured."
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. The last major casualty earthquake in Iran struck in East Azerbaijan province in August 2012, killing over 300 people.