An earthquake with a preliminary magnitude of 5.2 jolted northeastern parts of Japan on Sunday afternoon, the Meteorological Agency reported.