Ecuadorian President Guillermo Lasso tweeted a message urging residents to remain calm.
One victim was a passenger in a vehicle crushed by debris from a house in the Andean community of Cuenca, according to the South American country’s emergency response agency Risk Management Secretariat.
In the coastal state of El Oro, three people were killed and several were trapped under the rubble, the agency reported. In the community of Machala, a two-story house collapsed before people could evacuate, a pier gave way and the walls of a building broke, trapping an unknown number of people.
The agency said firefighters worked to rescue people while national police assessed the damage, their work being complicated by downed lines that interrupted telephone and electricity service.
In Guayaquil, about 170 miles southwest of the capital Quito, authorities reported cracks in buildings and homes, as well as some collapsed walls. Authorities have ordered the closure of three vehicular tunnels in Guayaquil, anchoring a metropolitan area of more than 3 million people.
Videos shared on social media show people gathering in the streets of Guayaquil and nearby communities. People reported objects falling into their homes.
A video posted online showed three anchors from a show shooting from their studio desk as the set shook. They initially tried to shrug it off as a small earthquake, but soon fled from the camera. One anchor indicated that the show would have a commercial break, while another repeated, “My God, my God.”
A report from Ecuador’s Adverse Event Monitoring Directorate ruled out a tsunami threat.
The quake was also felt in Peru, from the northern border with Ecuador to the central Pacific coast. No immediate deaths or injuries were reported. In the northern region of Tumbes, the old walls of an army barracks collapsed, authorities said.
Ecuador is particularly prone to earthquakes. In 2016, an earthquake further north on the Pacific coast in a sparsely populated area of the country killed more than 600 people.
Associated Press writers Regina Garcia Cano in Caracas, Venezuela, and Franklin Briceño in Lima, Peru, contributed to this report.