The quake hit off the Nemuro peninsula at a depth of 61 kilometres (38 miles), according to the National Research Institute for Earth Science and Disaster Resilience (NIED).

There were no immediate reports of injuries or damage.

In two municipalities in Hokkaido, the quake registered as a "lower 5" on Japan's 7-point intensity scale, which measures ground motion.

That is usually a level where items fall out of shelves and unsecured furniture may move, according to the Japan Meteorological Agency.

(Reporting by David Dolan; Editing by Frank Jack Daniel and Alexander Smith)