BARRIO – (BBC) – Buildings have been damaged in several cities following the 6.7 magnitude quake, which hit at around midday local time (17:00 GMT).
The southern province of El Oro was the worst affected, where emergency services have reported people remain trapped inside collapsed houses.
Eleven deaths were in El Oro and one in Azuay province, authorities said.
Machala and Cuenca were among the cities that suffered damage to buildings and vehicles, as emergency services rushed to help people.
The epicentre was near Balao, about 50 miles (80km) from Ecuador’s second-largest city, Guayaquil, where about three million people live.
“I went out into the street because I saw people starting to run in panic, getting out of their cars,” Magaly Escandon, a businessowner in Cuenca, told the AFP news agency.
President Guillermo Lasso asked Ecuadoreans to remain calm as officials assess the damage.
“Emergency teams are mobilising to offer all their support to those who have been affected,” he said.
Mr Lasso’s office also confirmed that injured people were being treated in hospital, but did not offer any further details.
Several roads have been blocked by landslides, while several homes, educational buildings and health centres have been damaged, authorities said.
One person was reported killed in the city of Cuenca after a wall collapsed onto their car, while three people died when a security camera tower came down on Jambelí Island.
There have also been reports of the earthquake being felt in several other cities, including Manabi, Manta and the capital Quito.
This is the strongest quake to hit Ecuador since 2016, when nearly 700 people died and thousands were injured.
Officials in Peru say the quake was felt in northern regions of the country, but there were no immediate reports of casualties or damage.