NEW YORK (CBSNewYork) — A man has pleaded guilty to murder and other charges in a bloody 28-hour rampage stretching from Brooklyn to Manhattan that left four people dead and four others wounded.

Maksim Gelman, 24, entered the plea on Wednesday. He faces life in prison at sentencing. A hearing has been set for Jan. 11.

READ MORE: Trial Begins For Queens Man Brendan Hunt, Accused Of Posting Online Threats Against Lawmakers

PHOTO GALLERY: New York City Stabbing Spree

Gelman was arrested on Feb. 12 after a deadly stabbing spree which started with a family argument over the use of his mother’s car, police said.

WCBS 880’s Irene Cornell With More On The Story

After killing his stepfather, Aleksandr Kuznetsov, 54, in the family’s Brooklyn apartment, police said Gelman went to the home of a female acquaintance, Yelena Bulchenko, 20, where he killed her 56-year-old mother.

READ MORE: Rapper Warchyld Caught With Air Rifle Mounted On Roof Of Hummer In Manhattan

Police said he waited hours for Bulchenko to return and then stabbed her 11 times.

Gelman then stabbed a man during a carjacking before plowing into pedestrian Stephen Tanenbaum, 62, who died from his injuries. Authorities said he then attacked a livery cab driver and another man in a separate carjacking.

He was subdued by police at the Times Square subway station around the 40th Street and 7th Avenue exits after slashing subway passenger Joseph Lozito, of Philadelphia.

Earlier this year, court documents showed Gelman told police following his arrest that he would beat the charges and spend a few years in a mental hospital.

Gelman had pleaded not guilty to all the charges in April.

MORE NEWS: Lionel Virgile, Accused Of Throwing Bleach And Molotov Cocktail At NYPD, Facing Federal Charges

Gelman decided to change his plea because he wanted to get out of his holding cell and begin serving his time in a permanent facility, his lawyer said. Evidence in the case and a doctor’s opinion would prevent Gelman from arguing he was not guilty by reason of insanity.