A homeless man with a history of psychiatric problems is accused of fatally stabbing his roommate in a city shelter this week.

Police say 21-year-old Anthony White stabbed Deven Black, 62, in the neck on Wednesday night, killing him and nearly decapitating him. Black and White were sharing a room at the Boulevard Homeless Shelter in East Harlem for the night, and police say the two had an argument when White pulled out his weapon and began stabbing him repeatedly.

Shelter residents say that White, who fled the shelter before police arrived, had threatened others before allegedly stabbing Black, and made death threats when his smartphone went missing last week. “He would walk around yelling, ‘I’m going to kill somebody!’ ” one resident told the Daily News, with another telling the Times that he "had a real hot temper, over little things." White has a history of psychiatric issues, and spent time in a facility in 2013 for " behaving in a manner harmful to himself and others," according to the Post.

The Boulevard specifically houses men with mental health issues, and the mayor's office says the facility had ample security. "This was a shelter that had metal detectors, that had its own private security, that had all the things that we need to make sure shelters are safe," he said yesterday. "Something went wrong."

Black, who had only been in the shelter three days when he was stabbed, worked as a librarian at Castle Hill Middle School in the Bronx until 2014, when he was placed in the absent teacher reserve after allegedly behaving inappropriately towards a young student.