A magnitude 5.8 earthquake struck western El Salvador's Ahuachapan department at 0730 British time, the U.S. Geological Survey, monitored in London, reported.