The 7.3-magnitude quake rocked a border area 30 kilometres (20 miles) southwest of Halabja in Iraqi Kurdistan at around 9:20 pm (1820 GMT) on Sunday, the US Geological Survey said.
Many people would have been at home when the quake hit in Iran's western province of Kermanshah, where authorities said it killed at least 407 people and injured 6,700.
Across the border in more sparsely populated areas of Iraq, the health ministry said eight people had died and several hundred were injured.
Iraq's Red Crescent reported nine dead and more than 400 injured.
As dusk approached on Monday, tens of thousands of Iranians were forced to sleep outside in the cold for a second night as authorities scrambled to provide them with aid.
Some had spent Sunday night outdoors after fleeing their homes in the mountainous cross-border region, huddling around fires at dawn as authorities sent in help.
"People's immediate needs are firstly tents, water and food," said the head of Iran's elite Revolutionary Guards, Major General Mohammad Ali Jafari.
"Newly constructed buildings... held up well, but the old houses built with earth were totally destroyed," he told state television during a visit to the affected region.
5.1-magnitude earthquake jolts parts of K-P, FATA
Hundreds of ambulances and dozens of army helicopters reportedly joined the rescue effort after Iranian supreme leader Ayatollah Ali Khamenei ordered the government and armed forces to mobilise "all their means".
Like other foreign media organisations, AFP had not received authorisation to visit the scene of the disaster on Monday.
Relief camps
Officials said they were setting up relief camps for the displaced.
Iran's emergency services chief Pir Hossein Koolivand said landslides had cut off roads to affected villages, impeding the access of rescue workers.
But by late afternoon, officials said all the roads in Kermanshah province had been re-opened, although the worst-affected town of Sar-e Pol-e Zahab remained without electricity, said state television.
Officials said 22,000 tents, 52,000 blankets and tonnes of food and water had been distributed.
The official IRNA news agency said 30 Red Crescent teams had been sent to the quake zone.
Collapsed walls
After initially pinning the quake's epicentre inside Iraq, the USGS then placed it across the border in Iran on Monday morning.
Iran's Sar-e Pol-e Zahab, home to some 85,000 people close to the border, was the worst hit with at least 236 dead.
At dawn, buildings in the town stood disfigured, their former facades now rubble on crumpled vehicles.
In an open space away from wrecked housing blocks, men and women, some wrapped in blankets, huddled around a campfire.
Iranian media reported that a woman and her baby were pulled alive from the rubble.
Mexicans to get earthquake alerts through early warning app
The towns of Eslamabad and Qasr-e Shirin were also affected, while the tremor shook several western Iranian cities including Tabriz.
Some 259,000 people live in the region, according to the most recent census.
State television showed tents, blankets and food being distributed in areas struck by the temblor.
In neighbouring Dalahoo County, several villages were totally destroyed, an official told Tasnim agency.
Windows shattered
In Iraq, the health ministry said the quake had killed seven people in the northern province of Sulaimaniyah and one in Diyala province to its south.
More than 500 people were injured in both provinces and the nearby province of Kirkuk.
Footage posted on Twitter showed panicked people fleeing a building in Sulaimaniyah as windows shattered at the moment the quake struck. Images from the nearby town of Darbandikhan showed walls and concrete structures that had collapsed.
Nizar Abdullah spent the night with neighbours sifting through the ruins of a two-storey home next door after it crumbled into concrete debris.
"There were eight people inside," the 34-year-old Iraqi Kurd said.
Some family members managed to escape, but "neighbours and rescue workers pulled out the mother and one of the children dead from the rubble".
Residents flee homes in Turkey
The quake, which struck at a relatively shallow depth of 23 kilometres, was felt for about 20 seconds in Baghdad, and for longer in other provinces of Iraq, AFP journalists said.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ