A powerful earthquake struck southern Taiwan near the city of Tainan, toppling a 17-storey apartment building and collapsing other structures.

There were no immediate reports of deaths or serious injuries but 123 people have so far been rescued.

At least five aftershocks of 3.8-magnitude or more shook Tainan about half an hour after the initial quake, according to Taiwan's Central Weather Bureau.

Taiwan's Formosa TV showed images of police, firefighters and some troops in camouflage uniforms at the site of a collapsed residential building and said its reporters could hear the cries of some residents trapped inside.

The firefighters were hosing down part of the building to prevent a fire, while others used ladders and a crane to enter the upper floors.

Taiwan lies in the seismically active 'Pacific Ring of Fire' zone and it was struck by a magnitude 7.7 quake that killed more than 2,400 people in September 1999.

The US Geological Survey said the latest quake, a magnitude 6.4, was centred 43 km south-east of Tainan, a city of nearly two million people.

The quake was very shallow, at a depth of 10 km, which would have amplified its effects, the USGS said.