The quake was centred in southern Ibaraki prefecture, northeast of Tokyo, according to the agency.
Japan is one of the world's most seismically active areas, accounting for about 20 percent of the world's earthquakes of magnitude 6 or greater.