The quake hit early Wednesday, about 20 minutes after midnight local time (0523 GMT), on the nation's western coast just north of La Esperanza at a depth of 10 kilometers (6.2 miles).
There were no immediate reports of damage or injuries from the quake in the Central American nation.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.