A 6.3 magnitude earthquake struck 34 km (21 miles) off Taiwan's eastern city of Hualien on Friday, the weather administration said, with no immediate reports of damage from what was the second strong tremor to hit the island in less than a day.
The quake also shook buildings in the capital Taipei. Authorities said subway services in the city continued at lower speeds.
"It was close," said Hsieh Yu Wei, a singer who pulled his car over the moment he received a government-issued quake warning while driving on a Hualien coastal highway.
The quake had a depth of 9.7 km, the weather administration said, and followed a 5.7 magnitude earthquake that struck off Taiwan's northeastern shore on late Thursday.
Weather officials have warned of the risk of landslides in mountainous areas following days of rain.
Taiwan lies near the junction of two tectonic plates and is prone to earthquakes.
In April, Hualien was hit by the biggest earthquake to affect Taiwan in at least 25 years. Nine people were killed and more than 900 injured.
US President Donald Trump and Iran threatened to escalate their war by attacking energy and desalination facilities in the Gulf, a potential widening of hostilities that could deepen a regional crisis and add to concerns in global markets.
An Israeli airstrike on a police vehicle on Sunday killed three people in the middle of the Nuseirat camp in the central Gaza Strip, health officials said, hours after another person was killed in a strike on northern Gaza.
The Strait of Hormuz remains open to all shipping except vessels linked to "Iran's enemies", Iran's representative to the UN maritime agency was quoted as saying in Iranian media reports published on Sunday.
The Gulf Cooperation Council (GCC) has renewed its condemnation of continued Iranian attacks on member states, including the targeting of infrastructure and oil facilities, in flagrant violation of international law and a direct threat to regional security, stability and the safety of global energy supplies.