An earthquake of magnitude 5.8 struck near the coast of northern Chile on Wednesday, the GFZ German Research Centre for Geosciences said. The quake was at a depth of 21 kilometers (13.05 miles), GFZ added.