A 7.0 magnitude earthquake struck off Taiwan's northeastern coast late on Saturday, the island's Central Weather Administration said.
The quake, some 32 km (20 miles) off the city of Yilan, hit at 11:05 pm local time (1505 GMT/UTC) and had a depth of 73 km (45 miles), it added.
Residents and local media described how the quake shook buildings in the capital, Taipei, as the government sent alerts to public mobile phones.
Local media reported that some ceilings collapsed and supermarket shelves toppled.
Rail operators temporarily slowed some train and high-speed rail services as a precaution.
Within minutes, however, the Taipei city government said there were no immediate reports of major damage.
The quake was not severe enough for officials to issue a tsunami alert, Reuters news agency cited the country's fire department as saying.
Taiwanese President Lai Ching-te urged residents to "stay vigilant." He encouraged them to check on family and friends and warned of possible aftershocks.
However, the shaking did force evacuations at a small number of facilities owned by the world's largest contract chipmaker, TSMC.
"Prioritising personnel safety, we are conducting outdoor evacuations and headcounts in accordance with emergency response procedures. Work safety systems at all facilities are operating normally," the company said in a brief statement.
Taiwan is vital to the global technology sector as it produces the most advanced semiconductors, including the cutting-edge chips no other country can currently match.
Any disruption to Taiwan’s chipmakers would jolt global supply chains, crippling industries from smartphones to cars and pushing up tech prices worldwide.
Taiwan is prone to earthquakes; one of the most recent killed more than 100 people in 2016.
In April 2024, a magnitude-7.2 quake struck the island's east, killing at least 18 people and injuring more than 1,000.
A 7.3 magnitude quake in 1999 killed more than 2,000 people.
