The agency said the quake struck at 02:32am (1732 GMT Sunday) in the Pacific Ocean at a depth of 60 kilometres (37 miles) north east of Japan's Hokkaido island, close to the disputed Russian administered Kuril Islands.
There were no immediate reports of damage.
The epicentre lay closest to Russian territory, 94 kilometres from the town of Kuril'isk. The nearest Japanese city, Nemuro was located 291 kilometres away from the epicentre.
The Kuril islands are at the heart of a long running territorial dispute between Japan and Russia.
They were seized by Soviet troops in the final days of World War II. Tokyo has insisted on the return of all four islands, which are known as the South Kurils by Russia and the Northern Territories by Japan.
Japan's islands are situated at the conjuncture of several tectonic plates and experience a number of relatively violent quakes every year.
But thanks to strict building codes, even powerful quakes that might wreak havoc in other countries frequently pass without causing much damage.
In May, a strong 6.0-magnitude earthquake shook buildings in the Japanese capital Tokyo, injuring 17 people.