Updated

A nursing home resident upset about being ill with cancer confessed to setting a fire that killed 12 fellow patients, most of them bedridden and too frail to escape, authorities in Taiwan said.

Security video broadcast on TV showed nurses working frantically to save patients, wheeling their beds into nearby corridors and performing CPR on stricken victims outside Hsinying hospital early Tuesday morning. The nursing home is on the second floor of the hospital in the southern city of Tainan.

Prosecutor Tseng Chao-kai said the security cameras also showed a naked man fleeing the blaze and police later found him hiding in a storage facility at the Hsinying hospital. The prosecutor said Lin Chi-hsiung confessed he set the fire because he was unhappy about his own protracted illness. Lin, 67, was detained late Tuesday pending filing formal charges

The fire was extinguished about 40 minutes after it broke out, and rescuers safely evacuated more than 100 patients, hospital official Tsai Ming-shih said. Sixty people were injured. Tsai said the victims died of smoke inhalation.

Nursing homes are a relatively new phenomenon in Taiwan, where Confucian values dictate that family members care for elderly relatives themselves, rather than consigning them to institutions for the aged.

Tuesday was Taiwan's government-recognized "Day for the Elderly," when officials hand out packets of money — in some cases amounting to as much as Taiwan dollars 9,000 ($300) — to citizens 80 years of age and older.