Photo/IllutrationA 42-year-old man, center, identified only by his family name Ahn, is escorted by police officers at a district court in Jinju, South Korea, on April 18. (Yonhap via AP)

SEOUL--South Korean police are investigating a 42-year-old man accused of setting his apartment on fire and fatally stabbing five neighbors as they attempted to flee, in violence that shocked the nation.

The man poured gasoline in his living room and then threw burning newspapers to start the blaze Wednesday, according to police in the southeastern city of Jinju, where the incident took place.

He then knifed other residents of the apartment building as they tried to escape, killing five and injuring six others, Jinju police station chief Lee Heui Seok said. Seven other people were injured by smoke inhalation, Lee said.

He said the man has a history of mental illness and told investigators he committed the attacks "to defend himself from those trying to slander him."

Prime Minister Lee Nak-yeon criticized police on Thursday for what he said was a failure to properly monitor a person known for past violence and clashes with neighbors.