A 6.8 magnitude earthquake hit the sparsely populated southeastern part of Taiwan on Sunday, the island's weather bureau said, derailing train carriages and causing a convenience store to collapse.
The weather bureau said the epicentre was in Taitung county, and followed a 6.4 magnitude temblor on Saturday evening in the same area, which caused no casualties.
The US Geological Survey measured the quake at a magnitude 7.2 and at a depth of 10 km (6.2 miles).
Taiwan media said a low-rise building housing a convenience store collapsed in Yuli and rescue work had begun to free the four people inside, while a vehicle is suspected of having been thrown off a bridge that toppled.
The Taiwan Railways Administration said three carriages came off the rails at Dongli station in eastern Taiwan after part of the platform canopy collapsed, and the roughly 20 passengers aboard had been evacuated and were uninjured.
The US Pacific Tsunami Warning Center issued a warning for Taiwan after the tremor but later rescinded the alert.
Japan's weather agency issued a warning for tsunami waves of 1 metre (3.2 feet) for part of Okinawa prefecture following the earthquake.
The quake could be felt across Taiwan, the weather bureau said. Buildings shook briefly in the capital Taipei.
Science parks in the southern cities of Tainan and Kaohsiung, home to major semiconductor factories, said there was no impact on operations.
Taiwan lies near the junction of two tectonic plates and is prone to earthquakes.
More than 100 people were killed in a quake in southern Taiwan in 2016, while a 7.3 magnitude quake killed more than 2,000 people in 1999.