One million people have been evacuated in Chile after a powerful earthquake hit the country's central region.
At least five people died when the 8.3-magnitude quake hit at 19:54 local time (22:54 GMT).
A tsunami alert was originally issued for the entire Chilean coast but has been partly lifted since.
Chile's deputy interior minister said it was the sixth most powerful quake to hit the country. Seismologists have reported dozens of aftershocks.
Three people died of heart attacks and another two were crushed by falling walls and masonry, officials said.
A local mayor reported a sixth victim, a 19-year-old who was crushed to death in the town of Monte Patria, although this has not been confimed.
The US Geological Survey (USGS) said the tremor struck off the coast of Chile's Coquimbo region, 46km (29 miles) west of the city of Illapel.
The USGS said it was at a depth of 25km, while Chilean seismologists calculated its depth at 11km.
Residents of Illapel fled into the streets in terror, local media reported.
People in coastal areas sought shelter on higher ground while those in cities sought safety in the streets.
"The motion began lightly, then stronger and stronger," said Jeannette Matte, a resident of Santiago.
"We were on the 12th floor and we were very afraid because it was not stopping. First it was from side to side, then it was like little jumps."
The quake caused buildings to sway in cities as far away as the Argentine capital Buenos Aires.
The earthquake struck as thousands of Chileans were travelling to the coast ahead of a week of celebrations for independence day.
The authorities were quick to issue tsunami alerts keen to avert a repeat of the slow response to the 8.8-magnitude quake in 2010, which devastated large areas of the country.
More than 500 people died in the quake and the tsunami it triggered and memories of the tragedy are still raw.
Tsunami alerts were issued shortly after the quake struck for the entire Chilean coast as well as Peru, Hawaii, parts of California and as far away as New Zealand.
They remain in effect in some of the worst affected areas, but have been lifted in those further away from the quake's epicentre.
Maria Angelica Leiva from the coastal town of Navidad described how she fled her home.
"It's been awful. We ran out of the house with our grandchildren and now we are on a hill hoping it will be over soon," she told Reuters news agency.
"It is all very dark, and we just hope the sea hasn't reached our house," she added.
President Michelle Bachelet said that "once again we must confront a powerful blow from nature".
The president will travel to the affected areas later on Thursday.
Officials said 1,800 people in the worst hit town of Illapel were left without drinking water.
Electricity providers said hundreds of thousands of their clients had no power.
Chile is one of the most seismically active locations on the globe.
It runs along the boundary between the Nazca and South American tectonic plates. These are vast slabs of the Earth's surface that grind past each other at a rate of up to 80mm per year.