Japanese authorities said a magnitude 6.6 quake struck off the southern and westernmost island of Yonaguni, which is about 110 kilometers (66 miles) east of Taiwan.
Taiwan's Central Weather Bureau said the magnitude 6.1 quake was 27 kilometers (17 miles) deep. The U.S. Geological Survey said the quake was 6.3 magnitude. Preliminary measurements can often differ immediately after a temblor and can be revised after further analysis.
The Japan Meteorological Agency said there was no danger of a tsunami. The meteorological agency said the 3:23 p.m. (0623GMT) quake struck 20 kilometers (12 miles) below the sea surface.
The agency said there may be small swelling of the water but there was no danger of a tsunami.