A magnitude-5.3 earthquake hit the northern city of Hakodate on Thursday, registering a lower 6 on the Japanese seismic scale of 7, the Meteorological Agency said.