A magnitude-5.1 earthquake hit off Sado in Japan on Thursday at a depth of 10 kilometers, according to the Japan Meteorological Agency.