The strongest earthquake to hit Ecuador in decades has flattened buildings and buckled highways along the country's Pacific coast, killing at least 77 people and sending the Andean nation into a state of emergency.
As rescue workers rushed in, officials said at least 77 people were killed, more than 570 were injured and the damage stretched for hundreds of miles to the capital Quito and other major cities.
The magnitude-7.8 quake was centred on Ecuador's sparsely populated fishing ports and tourist beaches, 170 kilometres (105 miles) north west of Quito.
Vice president Jorge Glas gave the updated death toll early on Sunday at a press conference. Late on Saturday, he said there were reports of deaths in the cities of Manta, Portoviejo and Guayaquil - all several hundred kilometres from where the quake struck shortly after nightfall.
"We're trying to do the most we can but there's almost nothing we can do," said Gabriel Alcivar, mayor of Pedernales, a town of 40,000 near the quake's epicentre.
He pleaded for authorities to send earth-moving machines and emergency rescue workers as dozens of buildings in the town were flattened, trapping residents among the rubble. He said looting broke out amid the chaos but authorities were too busy trying to save lives to assert order.
"This wasn't just a house that collapsed, it was an entire town," he said.
President Rafael Correa signed a decree declaring a national emergency and rushed home from a visit to Rome. He urged Ecuadorians to stay strong while authorities handle the disaster and hoped to be back in the country by Sunday afternoon.
The quake was the strongest to hit Ecuador since 1979, Mr Glas said.
On social media, photos circulated of homes reduced to rubble, a shopping centre's roof torn apart, supermarket shelves shaking violently and a collapsed highway overpass that crushed a car. In Manta, the airport was closed after the control tower collapsed, injuring an air traffic control worker and a security guard.
In Quito, people fled into the streets in fear as the quake shook their buildings. It knocked out electricity in several neighbourhoods and six homes collapsed but after a few hours power was being restored, the city's mayor Mauricio Rodas said.
"I'm in a state of panic," said Zoila Villena, one of many Quito residents who congregated in the streets. "My building moved a lot and things fell to the floor. Lots of neighbours were screaming and kids crying."
More than 10,000 security forces were being mobilised to provide assistance but Mr Glas said accessing the disaster zone was difficult due to landslides.
Among those killed was the driver of a car crushed by an overpass that buckled in Guayaquil, the country's most populous city. The city's international airport was also briefly closed. Hydroelectric dams and oil pipelines in the Opec-member nation were shut down as a precautionary measure but so far had not reported any damage.
The Pacific Tsunami Warning Centre said hazardous tsunami waves were possible for some coasts. While the government had not issued a tsunami alert, towns near the epicentre were evacuated as a precautionary measure. Mr Glas later said it was safe for coastal residents to return to their homes.
An emergency situation was declared in six of Ecuador's 24 provinces, while sports events and concerts were cancelled until further notice nationwide.
"It's very important that Ecuadorians remain calm during this emergency," Mr Glas said from Ecuador's national crisis room.
The United States Geological Survey originally put the quake at a magnitude of 7.4 but then raised it to 7.8. It had a depth of 19 kilometres (12 miles). At least 36 aftershocks followed, one as strong as 6 on the Richter scale, and authorities urged residents to brace for even stronger ones in the coming hours and days.
The quake comes on the heels of two deadly earthquakes across the Pacific, in the southernmost of Japan's four main islands. A magnitude-6.5 earthquake struck on Thursday near Kumamoto, followed by a magnitude-7.3 earthquake just 28 hours later.
The quakes have killed 41 people and injured about 1,500, flattened houses and triggered major landslides.