An earthquake of magnitude 6.1 struck north of Japan’s islands of Okinawa on Saturday, the United States Geological Survey said.