An earthquake with a preliminary magnitude of 5.7 has rattled Okinawa and other southern Japanese islands, but there was no danger of a tsunami.

Japan Meteorological Agency said the quake occurred at 2:20 p.m. (0520 GMT) Monday off the coast of Okinawa, at the depth of 40 kilometers below the sea surface.

The quake in the south came just minutes after another relatively strong temblor hit the north.

A magnitude 5.5 quake occurred just off the southern coast of Hokkaido, Japan's northernmost main island at 2:13 p.m. (0513 GMT). There was no fear of tsunami from this one either.

There were no reports of immediate damage or injuries from the two earthquakes that struck almost simultaneously at both ends of the Japanese archipelago.