Image copyright EPA

Hopes are fading for dozens of people thought to be trapped in the ruins of a Taiwanese apartment complex toppled by an earthquake.

Most of the 27 confirmed to have died after Saturday's quake were in the Weiguan Jinlong building in Tainan City.

An investigation into its construction has been launched.

Earlier, a six-month-old baby girl was pulled alive from the rubble but she later died in hospital.

Sunday also saw a 20-year-old man was also pulled out alive.

About 200 people have now been rescued. Nearly 500 people were injured as a result of the magnitude 6.4 earthquake, and dozens remain in hospital.

Hundreds of soldiers are involved in the rescue effort, with the help of hi-tech equipment, sniffer dogs and cranes. Shelters are being set up for those who have lost their homes in the city of two million people.

Image copyright Reuters

Image copyright EPA

Image copyright Getty Images

The 17 storeys of the Weiguan Jinlong (Golden Dragon) apartment complex crumpled down on each other as the quake took hold just before 04:00 local time on Saturday (20:00 GMT Friday).

Census records suggest about 260 people were living there but it is now thought that more than 300 were inside at the time of the collapse, as some students renting rooms would not have been registered and people may have had guests staying to celebrate the Lunar New Year holiday beginning on Monday.

The BBC's Rupert Wingfield Hayes, in Tainan City, says there is an increasing sense of despair among the relatives still waiting for news.

Tainan Mayor William Lai said survivors and relatives had reported legal "violations" but gave no further details.

"I've contacted judicial units and prosecutors have formally launched an investigation," he told reporters.

"We've also commissioned three independent bodies to preserve evidence during the rescue so we can assist the residents if they want to file lawsuits in the future. We will hold the builder responsible if they have broken the law."

Taiwan's problems with public safety

Elsewhere in the city, at least two other victims were killed by falling debris.

Image copyright EPA

Image copyright EPA

Image copyright Reuters

One woman at the site said her son had been found dead but she was hoping for her daughter-in-law and two grandchildren would be rescued alive.

"I won't give up hope, I will wait here until I see them come out safe," she said.

Su Yi-ming, 48, who lived on the sixth floor of the complex, told AFP news agency that he was rescued after tapping on a wardrobe that was trapping him.

"I knocked on the closet to get the attention of rescuers who broke the window to get me," he said.

A woman surnamed Chang said she was waiting to hear from her daughter, who lived on the fifth floor of the fallen block of flats.

"She's not answering my phone calls. I am trying to hold my emotions and stay strong. I'll do that until I find her," she said.

"I know they will find her, but I have also prepared for the worst."

The quake was shallow, meaning its effects would have been amplified, the US Geological Survey said.

There were also at least five aftershocks. The quake was felt in the capital Taipei, 300km away.

Taiwan lies near the junction of two tectonic plates and often sees tremors.