A powerful 7.9 earthquake has hit the coast of Peru, killing at least 337 people and injuring hundreds, Peru's civil defence institute has said.
All but one of the deaths were in the coastal province of Ica, about 265km (165 miles) south of the capital, Lima.
In Lima, buildings shook violently during the prolonged tremors, prompting residents to take to the streets.
President Alan Garcia said he was sending three cabinet ministers to the worst affected towns.
The earthquake struck coastal Peru at 1841 (2341 GMT) and lasted for several minutes,
The US Geological Survey said the epicentre was beneath the Pacific Ocean, about 145km (90 miles) south-east of Lima. Four strong aftershocks ranging from 5.4 to 5.9 followed, the organisation said.
Rush-hour traffic in Lima came to a halt as buildings shook with the force of the powerful tremors and hundreds of people spilled onto the streets.
But the full devastating force of the earthquake was felt closer to the epicentre in the southern coastal province of Ica, where it brought down buildings, cut power supplies and disrupted communications.
Low-lying coastal areas in Peru, Chile, Ecuador and Colombia were evacuated after a tsunami alert was issued. The warning was later withdrawn.
Deputy Health Minister Jose Calderon described the situation in Ica, where 650,000 people live, as "dramatic".
On its website, the National Institute for Civil Defence said 336 people had been killed in Ica by the earthquake and 827 others injured. One person was killed in Lima.
The mayor of Ica, Mariano Nacimiento, said he had asked the government for medicine, blankets, tents and all help that could be given.
"We're working, visiting areas where there are dead people and for this, the government's role is very important," he told Radio Programas del Peru (RPP).
Local TV reports said many of the dead and injured in Ica had been celebrating evening mass when the church they were in collapsed.
Speaking on national TV and radio, President Garcia thanked God that the earthquake had not caused "a catastrophe with an immense number of victims".
"We have declared a state of emergency in Ica province and we are going this evening to ensure that regional and local governments, civil defence institutions and ministries can spend what they need to, rapidly and immediately, in order to solve the problems that exist there," he said.
The president ordered police onto the streets of Lima to keep order, and schools are being closed because the buildings may be unsafe.
In Lima's poorer suburbs and shanty towns, news of the damage is still coming in, reports the BBC's Dan Collyns. However, he says the feeling in the city, where one third of the population lives, is that it may have narrowly avoided a major disaster.
Click to view image: '82773-_44061384_icaroadafp203b.jpg'
|Liveleak on Facebook|