At least six tall buildings were left tilting on their sides after the 6.4-magnitude earthquake struck credit: REUTERS and PAUL YANG/AFP/Getty

The quake left the 12-storey building leaning to one side, its lower floors pancaked.

The national fire agency said 143 residents from the building remained missing.

But it was not immediately clear if those unaccounted for were trapped inside the building.

Rescue and emergency workers block off a street in Hualien where a building was left tilting precariously

One local who lives nearby told how he watched the tower block partially collapse.

"I saw the first floor sink into the ground," said 35-year-old Lu Chih-son, who saw 20 people rescued from the building. "Then it sunk and tilted further and the fourth floor became the first floor.

"My family were unhurt, but a neighbour was injured in their head and is bleeding. We dare not go back home now. There are many aftershocks and we are worried the house is damaged."

A firefighter works at a collapsed building in the early hours credit: Tyrone Siu/Reuters

Resident Chen Chih-wei, 80, said he was sleeping in his apartment on the top floor of the building when the quake struck.

"My bed turned completely vertical, I was sleeping and suddenly I was standing," he said.

He said he managed to crawl his way to a balcony to wait for rescue, adding that the quake was the strongest he had felt in more than five decades of living in Hualien.

Smoke rises around a collapsed building amid rescue efforts credit: TYRONE SIU /Reuters

President Tsai Ing-wen visited the site on Wednesday morning, where officials were going room by room looking for anyone trapped inside.

"Now is the prime time for our rescue efforts, our first priority is to save people," she said in a Facebook post.

Four mobile cranes had been brought in on the back of trucks to help prop up the structure.

The worst-hit building was propped up with mobile cranes as it lent on its side credit: REUTERS

Liu Yan-hu, from the Hualien County Architects Association, said it looked like the building's main structure was intact.

Five more buildings including a hospital and a hotel were also damaged in the city, where roads were ripped apart and strewn with rubble.

The national fire agency said four people had been killed across the city, with 225 others injured. More than 117 people had been rescued from damaged buildings on Wednesday morning.

An aerial image shows a residential building leaning on a collapsed first floor credit: Central News Agency/AP

Hualien is one of Taiwan's most popular tourist hubs as it lies on the picturesque east coast rail line and near to the popular Taroko Gorge.

Frequent aftershocks left some residents stranded in the open as they feared going back into buildings.

Authorities said 830 people were in shelters on Wednesday morning and some 1,900 houses were without power.

Large cracks in a street after the powerful earthquake hit Hualien credit: TYRONE SIU /Reuters

The severely damaged Marshal Hotel had also crumpled into the ground as its bottom storeys disappeared.

"The lower floors sunk into the ground and I saw panicked tourists being rescued from the hotel," said witness Blue Hsu.

View more!

Earthquake is two years after tremor that killed 100

The earthquake hit at just before midnight (3.50pm GMT) around 13 miles (21 kilometres) northeast of Hualien, according to the United States Geological Survey.

It followed almost 100 smaller tremors to have hit the area in the last three days and comes exactly two years since a quake of the same magnitude struck the southern Taiwanese city of Tainan, killing more than 100 people.

Rescue workers search for victims at a collapsed building in Tainan in February 2016 credit: Lam Yik Fei /Getty

Most of the deaths from the February 2016 earthquake were from the 16-storey Wei-kuan apartment complex, which toppled on its side and buried many residents in the rubble.

It was the only high-rise in Tainan to crumble completely in the quake, which came two days before Lunar New Year, when many people were visiting relatives for the biggest celebration of the Chinese calendar.

View more!

The safety of the building was called into question immediately after the disaster, when metal cans and foam were found to have been used as fillers in the concrete and residents said there had been cracks in the structure.

Five people were found guilty and sentenced to five years imprisonment over the disaster, including the developer and two architects, with prosecutors saying they "cut corners" that affected the building's structural integrity.

Why Taiwan is regularly hit by big earthquakes

Taiwan lies near the junction of two tectonic plates and is regularly hit by earthquakes.

The island's worst tremor in recent decades was a 7.6 magnitude quake in September 1999 that killed around 2,400 people.