ISTANBUL (Reuters) - Nine people were killed and buildings collapsed across southeastern Turkey on Sunday when a magnitude 5.7 earthquake struck near the border with Iran, injuring more than a hundred in villages and towns in both countries, government officials said.

In Turkey, three of the dead were children, and 50 people were injured, including nine critically, the health ministry said.

The shallow tremor caused more than 1,000 buildings to collapse in Turkey, prompting a brief rescue effort to find those trapped under rubble.

The quake damaged buildings some 90 km (56 miles) to the west in the Turkish city of Van, and to the east in dozens of villages in Iran, where state TV said 75 people were injured including six in hospital.

There were several aftershocks including a larger tremor measuring 6.0 magnitude that stuck nearby 10 hours later. There were no immediate reports of damage or casualties from that quake, which was also fairly shallow and potentially dangerous.

Crisscrossed by major fault lines, Iran and Turkey are among the most earthquake-prone countries in the world.

After the initial tremor, Turkish TV footage showed people digging with shovels and their hands in the rubble, as well as furniture and belongings strewn on cracked and snowy roads.

In one village the ground cratered under several buildings, while in others residents were wrapped in blankets outside homes with crumbled and cracked exterior walls, fallen metal roofs and twisted wiring.

“The damage caused loss of life,” the governor of Van, Mehmet Bilmez, told reporters standing in front of a pile of cinder blocks and sheet metal. “There is destruction in all four villages” he visited on Sunday morning, he added.

The European Mediterranean Seismological Centre (EMSC) said the quake, which hit at 8:53 a.m. (05:53 GMT), had a depth of 5 km (3.1 miles). The second big quake struck at 7:00 p.m.

Broadcasters and government officials said dozens of villages were rattled in Turkey. Nearly 150 tents were sent to shelter families in the region, where several schools in the districts of Baskale, Saray and Gurpinar sustained minor damage.

Turkey’s Disaster and Emergency Management Authority (AFAD) has begun rescue work in villages including in Ozpinar, about 25 km south of the epicenter, said Interior Minister Suleyman Soylu. AFAD measured the initial tremor at 5.9 magnitude.

The U.S. Geological Survey put the epicenter 47 km west of the Iranian city of Khoy, where people felt the effects, according to state TV.

An earthquake last month in eastern Turkey killed more than 40 people while another in Iran did structural damage to homes without causing any fatalities.

An Iranian official told state TV that rescue teams had been dispatched to the area in Iran’s West Azarbaijan province.

Another local official said the earthquake was felt in several towns including Urmiah and Salmas, and many villages including some that suffered “100% damage”, state TV reported.

Additional reporting by Kanishka Singh and Parisa Hafezi in Dubai and Aishwarya Nair in Bengaluru; Editing by Philippa Fletcher, William Maclean and Frances Kerry