Taiwan's quake-hit eastern county of Hualien was rattled by more than 200 aftershocks late on Monday and early on Tuesday, but only minor damage was reported and no casualties and major chipmaker TSMC said it saw no impact on operations.
Largely rural and sparsely populated Hualien was hit by a 7.2 magnitude earthquake on April 3 that killed at least 17 people, and there have been more than 1,000 aftershocks since.
Buildings across large parts of northern, eastern and western Taiwan, including in the capital, Taipei, swayed throughout the night, with the largest quake measuring a 6.3 magnitude. All were very shallow.
"Especially at 2:00 am, it shook very strongly. In fact, for a moment even I thought about rushing downstairs, but as we live on the sixth floor, I felt it a bit troublesome to go down," said Taipei resident Aden Peng, 44, a medical researcher.
"Then again, according to my previous experience, I thought it should be fine and hoped it would be fine," Peng added. "And because I was very tired, I just continued to sleep, hoping for the best."
Taiwan's Central Weather Administration said the spate of earthquakes starting Monday afternoon - which it put at more than 200 - were aftershocks from the large April 3 quake.
Seismological Centre Director Wu Chien-fu told reporters that the aftershocks were a "concentrated release of energy" and that more could be expected, though perhaps not as strong.
With heavy rain predicted for all of Taiwan this week, people in Hualien need to be prepared for further disruption, he added.
Taiwan President Tsai Ing-wen, writing on her Facebook page, called on people to avoid the mountains and to stay alert.
"When an earthquake occurs, don't panic. Master the principle of 'duck, cover, stay put'," she wrote.
The Hualien fire department said two buildings, already uninhabited after being damaged on April 3, suffered further damage and were leaning.
There were no reports of casualties.
The world's largest contract chipmaker, Taiwan Semiconductor Manufacturing Co (TSMC), whose factories are on the island's western coast, said some staff at a small number of factories were evacuated, but facility and safety systems were functioning normally and all personnel were safe.
"Currently, we do not expect any impact on operations," it said in an email.
Investors brushed off concerns about the quake, with TSMC's Taipei-listed shares closing up 1.6 per cent on Tuesday.
In mountainous Hualien county, some road closings following rockfalls were reported, and the government suspended work and school for the day.
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.

Saudi Coalition confirms Riyadh office tower hit by Houthi drone, no injuries
Israeli military kills chief of Hamas' armed wing in Gaza strike
Car bomb was used in Pakistan gold mine attack, regional minister says
Zelenskyy arrives in Britain for talks with PM, meeting of Crimea Platform
WHO's Tedros says 2 workers killed carrying Congo relief supplies
Surfer killed in shark attack in Australia's New South Wales
Pope Leo condemns attacks on Ukrainian civilians, urges Gaza flood relief
Meta says Australia social media ban hit 1.5 million teen accounts in first year
