BROOKLYN - (AP) - A man accused of going on a 28-hour stabbingrampage through the city shouted that he was the victim of a"setup" as he was led from a police station Sunday.

Maksim Gelman was arraigned in Brooklyn Criminal Court oncharges that he hacked three people to death, then stalked the cityfor more than a day, attacking innocent strangers, hijackingvehicles and killing a pedestrian with a car. He did not speak ashe stood shackled at the ankles and arms while dressed in a whitejumpsuit issued to him after his bloody clothing was seized asevidence. He was ringed by a half-dozen guards.

Public defender Michael Baum, who represented Gelman at thearraignment, said he could not shed any light on Gelman's mentalstate during the time police say he was committing the crimes, buthe described his client Sunday evening as "calm" and"rational."

"He's very concerned about the nature of the charges," Baumsaid. "There are many things he wants to discuss about whathappened."

A small throng of Brooklyn residents taunted Gelman from thesidewalk as he was escorted out of a police precinct for his tripto court.

The 23-year-old cursed and yelled back that it "was a setup"as he was led to a vehicle.

Gelman was arraigned on charges of second-degree murder, robberyand assault in the Brooklyn attacks. He was being held withoutbail. He likely will face charges in Manhattan for an attack on asubway train passenger before he was arrested Saturday morning.

Police said Gelman's terror spree ended after he was captured indramatic fashion on the subway train beneath Times Square. Afterdodging officers by dashing across the tracks, Gelman pounded onthe door of the compartment of a moving train and demanded that thedriver let him in, authorities said.

Then, he turned and attacked a passenger, stabbing him in thehead before two police officers who had been riding with the driversprang to his aid, they said. When the fracas ended, Gelman was inhandcuffs and the officers were in possession of his bloody 8-inchkitchen knife, police said.

The Ukraine-born Gelman and his mother became naturalized U.S.citizens about five years ago, Police Commissioner Raymond Kelly said. He lived with his familyin a predominantly Eastern European section of Brooklyn. He wasknown to be a troublemaker and has a criminal history, but thearrests were mostly non-violent, for criminal possession of acontrolled substance, criminal mischief or graffiti, though some ofhis arrest records were sealed.

Vigil held for victims of BK stabbing spreePolice arrest suspect in deadly Sheepshead Bay rampage