A strong earthquake damaged buildings and buckled roads near Taiwan's eastern coast, killing two people and injuring more than 200.
A hotel employee died in Hualien county when the ground floor caved in at the Marshal Hotel, and another person died in a residential building, the national fire and rescue service reported.
A maintenance worker who was rescued after being trapped in the hotel's basement said the force of the earthquake was unusual.
"At first it wasn't that big ... we get this sort of thing all the time and it's really nothing. But then it got really terrifying," Chen Minghui said after he was reunited with his son and grandson. "It was really scary."
Other buildings shifted on their foundations due to the magnitude-6.4 quake late Tuesday and rescuers used ladders, ropes and cranes to get residents to safety.
Taiwanese media reported that a separate hotel known as the Beautiful Life Hotel was tilting. The agency also posted photos showing a road fractured in several parts.
Bridges and some highways were closed pending inspections after buckling due to the force of the quake.
With aftershocks continuing through the night, residents were being directed to shelters, including a newly built baseball stadium, where beds and hot food were provided.
Speaking from a crisis center in Taipei, Cabinet spokesman Hsu Kuo-yung said rail links appeared to be unaffected and the runway of Hualien airport was intact.
"We're putting a priority on Hualien people being able to return home to check on their loved ones," Hsu said.
The US Geological Survey said the magnitude-6.4 quake struck just before midnight Tuesday about 21 kilometers (13 miles) northeast of Hualien at a relatively shallow depth of about 10.6 kilometers (6.6 miles).
Taiwan has frequent earthquakes due to its position along the "Ring of Fire," the seismic faults encircling the Pacific Ocean where most of the world's earthquakes occur.
Exactly two years earlier, a magnitude-6.4 quake collapsed an apartment complex in southern Taiwan, causing the deaths of 115 people. Five people involved in the construction of the complex were later found guilty of negligence and given prison sentences.
A magnitude-7.6 quake in central Taiwan killed more than 2,300 people in 1999.