Rescue workers scrambled to search for survivors in buildings left tilting precariously on their foundations in Taiwan, after a 6.4-magnitude earthquake killed at least four people and injured more than 200.

Scores more people were trapped and others missing after the tremor shook the city of Hualien on the east coast, while a series of aftershocks were felt throughout the night.

At least six tall buildings were left tilting on their sides. The worst-hit and was propped up with cranes as it lent at about 45 degrees.

Authorities said they could not verify how many residents were still missing after the quake, which hit the popular tourist port city late on Tuesday.

Early on Wednesday, rescue efforts were focused on the Yun Tsui residential building, which also housed a restaurant, shops and a hostel.