Buildings in El Salvador could be seen to move as the natural phenomenon hit the small, densely populated country. Witnesses have also reported feeling the impact of the quake in Managua, the capital of Nicaragua. Meanwhile, the US Geological Survey (USGS) reported a 5.7-magnitude tremor off Nicaragua.
The USGS said the quake struck some 39 kilometers (24.2 miles) west-southwest of Jiquilillo, Nicaragua, at a depth of 71 kilometers.
Jorge Melendez, director of civil protection in El Salvador said there were only scattered reports of minor damage. The epicenter was near to where the land borders of El Salvador, Honduras and Nicaragua are at their closest point, and some buildings in Honduras were also evacuated, authorities said.
Mr Melendez said: “There is no major damage.”
There are no reports of any injuries.
According to the USGS an earthquake is caused by a sudden slip on a fault.
The tectonic plates are always slowly moving, but they get stuck at their edges due to friction.
When the stress on the edge overcomes the friction, there is an earthquake that releases energy in waves that travel through the earth’s crust and cause the shaking that we feel.