A magnitude 6.4 earthquake has struck near the coast of Taiwan, killing two hotel employees and injuring more than 200 other people, officials said.

The Central News Agency reported that the ground floor of the Marshal Hotel in Hualien county had caved in, causing the deaths of the two employees.

Other buildings were shifted on foundations 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.

Emergency services attend the scene after a building collapsed on its side after the earthquake in Hualien County, eastern Taiwan (EBC via AP)
Emergency services attend the scene after a building collapsed on its side after the earthquake in Hualien County, eastern Taiwan (EBC via AP)

The agency also posted photos showing a road fractured in several parts.

The US Geological Survey said the quake struck late on Tuesday about 21 kilometres (13 miles) north-east of Hualien, on the island’s east coast.

It occurred at a depth of about 9.5 kilometres (six miles).

The earthquake followed one over the weekend off the coast of Hualien, which lies along the famed “Pacific Rim of Fire” known for seismic activity from Alaska to Southeast Asia.

The quake came exactly two years after a magnitude 6.4 quake struck southern Taiwan, causing the collapse of an apartment complex and 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.

Earthquakes rattle Taiwan frequently. Most are minor and cause little or no damage.