An earthquake of magnitude 5.8 struck near coast of central Peru on Sunday, the European-Mediterranean Seismological Centre (EMSC) said.