The strongest earthquake to hit Ecuador in decades flattened buildings and buckled highways along the country's coast, killing at least 41 people and causing damage hundreds of miles (kilometers) away from the epicenter in the capital and other major cities.

The death toll was expected to rise on Sunday as rescuers reached the sparsely populated area of fishing ports and tourist beaches where the magnitude-7.8 quake was centered.

"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 epicenter. He pleaded for authorities to send earth-moving machines and rescuers as dozens of buildings in the town were flattened, trapping residents among the rubble. He said looting broke out amid the chaos but that 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.

Vice President Jorge Glas said in a televised address late Saturday that there were initial reports of 41 dead in the cities of Manta, Portoviejo and Guayaquil — all several hundred kilometers (miles) from where the quake struck shortly after nightfall.

The quake was the strongest to hit Ecuador since 1979, Glas said. On social media photos circulated of homes reduced to rubble, the roof of a shopping center torn apart and supermarket shelves shaking violently. In Manta, the airport was closed after the control tower collapsed, injuring an air traffic control worker and a security guard.

In the capital Quito, hundreds of kilometers away, people fled to the streets in fear as the quake shook their buildings. The quake knocked out electricity in several neighborhoods and six homes collapsed but after a few hours the situation appeared under control and power was being restored, Quito'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 neighbors were screaming and kids crying."

More than 10,000 members of the security forces were being mobilized to provide assistance but Glas said accessing what he described as the "disaster" center 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 hadn't reported any damaged.

President Rafael Correa, who is in Rome after attending a Vatican conference Friday, called on Ecuadoreans to stay strong while authorities monitor events.

He said on Twitter he had signed a decree declaring a national emergency but that the earliest he could get back to Ecuador is Sunday afternoon. He said that there were "dozens of dead" from the earthquake.

The Pacific Tsunami Warning Center said hazardous tsunami waves are possible for some coasts. While the government hadn't issued a tsunami alert, towns near the epicenter were evacuated as a precautionary measure. Glas later said it was safe for coastal residents to return to their homes.

An emergency had been declared in six of Ecuador's 24 provinces, while sporting events and concerts were cancelled until further notice nationwide.

"It's very important that Ecuadoreans remain calm during this emergency," Glas said from Ecuador's national crisis room.

The USGS originally put the quake at a magnitude of 7.4 then raised it to 7.8. It had a depth of 19 kilometers. 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 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.

___

AP Writer Joshua Goodman contributed to this report from Bogota, Colombia.