A magnitude 6.1 earthquake struck El Salvador on Sunday, the European Mediterranean Seismological Centre said.