A survivor is telling of how he propped himself up against a wall for 20 hours to survive the collapse of a southern Taiwan building complex in Saturday's earthquake.

Ko Ching-chung said he was with his girlfriend in their apartment at the Weiguan Golden Dragon complex in the city of Taiwan when the 6.4 magnitude quake hit just before 4 a.m. on Saturday.

Seeking to avoid falling and potentially smothering her, Ko said he wedged himself into the space but began to lose strength as the hours went by. Finally, he could no longer hold himself in place and, begging her forgiveness, collapsed onto his girlfriend.

Soon after, rescuers heard her voice and pulled the pair from the rubble. The death toll in the tragedy now stands at 40.