
The quake struck four kilometers (2.5 miles) below the surface at 2352 GMT in the town of Antiguo Cuscatlan near the capital, the environment ministry said on Twitter.
In November a 7.0 magnitude offshore quake shook El Salvador and Nicaragua but no damage or casualties were reported.
In November 2015 a 5.4-magnitude earthquake struck off the coast of El Salvador without causing any victims.
In October 2014, a powerful 7.3-magnitude quake struck off the Central American country's coast, killing one person and wrecking homes.