A magnitude 5.1 earthquake hit off the coast of Claveria, Masbate on Saturday morning, the Philippine Institute of Volcanology and Seismology reported.