Electricity was cut off in parts of El Salvador and beyond and walls crumbled, but there were no reports of widespread damage.
The quake hit in the Pacific Ocean 170 kilometers southeast of the capital San Salvador, at a depth of 70 kilometers, the US Geological Survey said.
The earthquake's magnitude was initially given as 7.4 but then lowered to 7.3
The rumbling of the earth was felt all along the Central American coast, from Guatemala in the north to Nicaragua and Costa Rica in the south and inland to Honduras.
More From This Section
"It was strong when it started to rumble, and it would not stop. My family just prayed and asked God for it to stop," Maria Etelvina Deras, who lives in Usulutan, 110 kilometers southeast of the capital, told the radio station.
"All I could see was that things in the house were moving, and my wife grabbed me and took me out to the courtyard of the house and we waited for it to stop. It was ugly," said Ruben Aguirre in Zacatecoluca, another town southeast of the capital.
Walls of some buildings fell, mayor Salgado said, but there were no other immediate reports of injuries.
The US Pacific Tsunami Warning Center quickly issued a warning for coastal areas located within 300 kilometres of the epicenter, but lifted the alert minutes later.
"Any remaining threat should be evaluated by local authorities in impacted areas," the US agency said.
Electricity was knocked out in some eastern provinces of El Salvador, YSKL reported.
The tremor was felt in the Nicaraguan capital Managua and other cities, but no immediate injuries or damage were reported, officials said.
Seaside residents were urged to seek higher ground, and classes in schools were canceled nationwide for tomorrow.