Updated

The New York man accused of going on a bloody stabbing rampage that left four dead and at least four wounded was greeted by an angry crowd when he left a Brooklyn Precinct Sunday.

Maksim Gelman, 23, heard onlookers yell “Rot in hell!” and “Pig,” provoking Gelman to shout back “Shut up, man! This was a setup,” reported the New York Post.

Gelman was later arraigned on charges that he hacked three people to death, then stalked the city for more than a day, attacking innocent strangers, hijacking vehicles and killing a pedestrian with a car, reported the Associated Press. He did not speak as he stood shackled at the ankles and arms while dressed in a white jumpsuit issued to him after his bloody clothing was seized as evidence. He was ringed by a half-dozen guards.

Gelman, 23, was finally captured by police after an alleged stabbing attack on 40-year-old Joseph Lozito on a subway train at around 9:15 a.m. Saturday, the Post reports.

He shouted "My girlfriend ruined my life!" before committing his final act of brutality -- slicing the neck of a man on a Manhattan subway train early Saturday, sources told the Post.

Gelman was wrestled to the ground by three cops and the man he slashed, ending a 28-hour rampage during which he allegedly killed his mother's boyfriend as well as an ex-girlfriend he had been stalking and her mother.

He also allegedly stabbed three men during carjackings and fatally ran over a 62-year-old pedestrian.

Once in custody, Gelman made clear his obsession with Yelena Bulchenko, 20. He was convinced they were an item after a brief tryst that she tried to forget.

"She had to die," Gelman told cops, according to New York City Police Commissioner Ray Kelly.

"This was so horrendous and bizarre ... He did a lot of mayhem in a short amount of time," said Kelly, adding that the suspect was known to be a frequent drug user.

Click to read about Maksim Gelman's alleged stabbing rampage from the New York Post