An earthquake of magnitude 8.2 struck off the coast of Mexico, late Thursday local time, the PTWC said.