By Fabian Hamacher
HUALIEN, Taiwan (Reuters) - A magnitude 6.4 earthquake struck near the Taiwanese coastal city of Hualien late on Tuesday, the U.S. Geological Survey (USGS) said, killing at least two, injuring hundreds and trapping people inside several collapsed buildings.
Fire officials said up to 16 people were trapped in a residential building in Hualien, an area popular with tourists on Taiwan's rugged east coast.
The quake struck about 22 km (14 miles) northeast of Hualien shortly before midnight (1600 GMT), with its epicenter very shallow at just 1 km, the USGS said. Several aftershocks hit the area but there was no word of any tsunami warning.
The government said 214 people had been injured.
Hualien is home to about 100,000 people and streets were buckled by the force of the quake.
"The president has asked the cabinet and related ministries to immediately launch the 'disaster mechanism' and to work at the fastest rate on disaster relief work," President Tsai Ing-wen's office said in a statement.
Premier William Lai said the government was urgently repairing a major highway damaged by the quake.
Among the buildings toppled in the quake was the Marshal Hotel in Hualien, where two people were trapped inside, the government said.
Four other buildings, including two hotels and a military hospital, also tilted during the quake in Hualien, which is about 120 km (75 miles) south of the capital, Taipei.
"We were still open when it happened," said Lin Ching-wen, who operates a restaurant near the military hospital.
"I grabbed my wife and children and we ran out and tried to rescue people," he said.
The government said two bridges in the city were either cracked or could not be used due to the quake.
An earthquake with a magnitude of 6.1 struck nearby on Sunday.
Taiwan, a self-ruled island that China considers part of its territory, is prone to earthquakes.
More than 100 were killed in a quake in southern Taiwan in 2016, and some Taiwanese remain scarred by a 1999 earthquake with 7.6 magnitude that was felt across the island and which killed more than 2,000 people.
(Additional reporting by Jess Macy Yu and Taipei bureau; Editing by Tony Munroe, Gareth Jones and Paul Tait)