A magnitude 5.1 quake killed at least eight people in southern Spain on Wednesday, sending historic buildings crashing down as panicked residents fled.
Eight people including one child perished in the southeastern city of Lorca in the deadliest tremor in Spain in more than five decades, the regional government of Murcia said in a statement.
Another 167 were injured including three in grave condition in hospital, health officials reported.
The quake collapsed the fronts of buildings and ripped open walls. Streets were littered with crumbled buildings, chunks of masonry, fallen terraces and crumpled cars.
A church clocktower tumbled and smashed into pieces, narrowly missing a television reporter as he conducted an interview on Spanish public broadcaster TVE. A bronze bell lay in the rubble.
Fearful residents including families with children gathered outside with blankets as night fell. About 10,000 people were evacuated from the cordoned-off city-centre.
In an outdoor basketball court and children's playground, dozens of people spent the night on the ground wrapped in blankets.
One group of four evacuees sat in fold-up chairs in the early hours of Thursday, unable to sleep. As they escaped their damaged building they had seen the corpses of three people outside killed by falling bricks.
"I was scared to death," said one elderly woman who declined to give her name.
The tremor struck at 6.47pm (1647 GMT) with a depth of 10 kilometres (six miles) and could be felt as far away as the capital Madrid. It hit nearly two hours after a smaller 4.4 magnitude quake.
A doctor said many people had been hurt.
"I had just finished attending to a patient. We all went out into the streets and had to treat people, some with serious inuries, many unconscious, because the ambulances could not reach them," the doctor, identified only as Virtudes, told the online edition of El Pais.
"They just took away a man who had a wall fall on top of him."
Prime Minister Jose Luis Rodriguez Zapatero ordered military emergency units in after being told of the disaster while he was in a meeting with King Juan Carlos, the premier's office said in a statement.
The damage was concentrated in the towns of Lorca and Totana, which lie in one of the most active seismic zones of the Iberian peninsula, but also spread as far as Albacete and Velez-Rubio in Almeria, the premier's office said.
Train services were halted and emergency vehicles clogged roads to the city.
A total 225 emergency military units deployed to the quake zone along with another 400 safety workers including rescuers with search dogs, the interior ministry said.
Police also sent in two specialized trucks with floodlights and three helicopters including a Superpuma, the ministry said. The Red Cross moved in 24 ambulances and set up three field hospitals.
A total of 350 ambulances transferred 400 patients out of two of the town's hospitals, the regional government said.
Residents described confusion in the town of 92,700 inhabitants about 70 kilometres (45 miles) southeast of Murcia. Lorca traces its history back more than 2,000 years and boasts many medieval monuments.
Cristina Selva, 32, said she was playing with her two two-year-old daughters. "The building moved and I was was very scared for the girls. I took them and the three of us got under the table to wait for it to pass," she told El Pais.
"It was the longest 20 seconds of my life."
Francisco Martinez, 61, was watching television on the fourth floor when the building shook and he fled with his sister. "We don't know what the damage is because we cannot get in," he said as he spent the night sitting down outside.
It was the deadliest earthquake in Spain since April 19, 1956 when a tremor wrecked buildings and killed 11 people in Albolote, a town in the southern Spanish province of Granada.
Ironically, it struck on the same day many residents stayed away from work in the Italian capital Rome fearing a supposed prophecy of a devastating tremor by a self-taught Italian seismologist who died in 1979.