The death toll from Ecuador's strongest earthquake in decades has risen to at least 272, the president said, as rescue teams raced to dig out people trapped under rubble in shattered towns. 

The powerful 7.8-magnitude quake struck off the Pacific coast on Saturday and was felt around the country, flattening buildings and buckling roads in several western towns.

Officials had previously put the toll at 77 dead and nearly 600 injured.

"The immediate priority is to rescue people in the rubble," President Rafael Correa, who was rushing home from a trip to Italy, said on Sunday via Twitter.

More than 1,500 people were injured, authorities said.

The US Geological Survey said the shallow quake was centred 27km south-southeast of Muisne, a sparsely populated area of fishing ports that is popular with tourists.

Coastal areas nearest the quake were worst affected, especially Pedernales, a town of 40,000.

Dozens of frightened residents slept in the streets while men equipped with little more than car headlights tried to rescue survivors who could be heard trapped under the rubble.

"We're trying to do the most we can, but there's almost nothing we can do," said Pedernales Mayor Gabriel Alcivar, pleading for authorities to send earth-moving machines and rescue workers to help find any survivors.

"This wasn't just a house that collapsed. It was an entire town," he added.

Vice President Jorge Glas said the country had already deployed 10,000 armed forces. In addition, 4,600 national police were sent to towns near the epicentre.

Pedernales residents stand next to destroyed buildings after the 7.8-magnitude earthquake [Dolores Ochoa/The Associated Press]

Diego Castellanos, from Ecuador Red Cross, which has deployed 800 staff and volunteers in the most affected communities, said the only possible access to some areas was by helicopter. 

"The work of the volunteers is very hard so far, trying to find people trapped in these collapsed buildings," he told Al Jazeera from the capital Quito.

"It is difficult because we can't get to these communities by road, because some of the roads collapsed too."

Overall, a state of emergency was declared in six provinces.

In Guayaquil, the country's most populous city, rubble lay in the streets and a bridge fell on top of a car.

"It was terrifying,. We were all scared and we're still out in the streets because we're worried about aftershocks," Fernando Garcia, a Guayaquil security guard, told Reuters news agency.

Photos from the coastal city of Manta, where the airport was closed after the control tower collapsed, showed Red Cross workers arriving, police hunting through debris, a smashed sculpture and badly damaged buildings.

Ramon Solorzano, a 46-year-old local car parts merchant, said he was leaving with his family.

"Most people are out in the streets with backpacks on, heading for higher ground," Solorzano told Reuters, speaking in a trembling voice on a WhatsApp phone call. "The streets are cracked. The power is out and phones are down."

Residents also streamed into the streets of Quito, hundreds of kilometres away, and other towns across the nation.

The country's Geophysics Institute said in a bulletin that the quake struck at around 8pm (01:00 GMT) at a depth of 20km.

Among those killed was the driver of a car crushed by an overpass that buckled.

On social media residents shared photos of homes collapsed, the roof of a shopping centre coming apart and supermarket shelves shaking violently.

The location of the 7.8-magnitude earthquake, according to US Geological Survey [EPA]

The Pacific Tsunami Warning Centre said hazardous tsunami waves are possible for some coasts but the government has not issued a tsunami alert.

Hydroelectric dams and oil pipelines in the OPEC-member nation were shut down as a precautionary measure.

Also on Sunday, a magnitude 6.1 earthquake struck southeast of the Pacific island nation of Tonga.

Earlier in the week, two deadly earthquakes hit 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 28 hours later.

The quakes have killed 41 people and injured about 1,500, flattening houses and triggering major landslides.

TechKnow - Early earthquake warnings and 'smart guns'

Source: Al Jazeera and agencies