BROOKLYN - Police say they have arrested this morning a 23-year-old man accused of going on a rampage that left four people dead and three others injured.

According to investigators, Maksim Gelman was apprehended at 8:30 a.m. in the Times Square subway station after stabbing two different people on two different trains.

Police say Gelman stabbed his stepfather, Aleksandr Kuznetsov, numerous times at around 5 a.m. yesterday. Police found the 54-year-old's body inside his home on East 27th Street after receiving a 911 call.

About 11 hours later, police received another 911 call reporting a stabbing just a few blocks away on East 24th Street. When they arrived, officers say they discovered the bodies of Gelman's girlfriend, 20-year-old Yelena Bulchenko, and her mother, 56-year-old Anna Bulchenko.

Officials say Gelman escaped in a stolen grey Lexus and drove a few blocks north to St. Marks Avenue, where he carjacked a livery cab after stabbing its driver three times. He then continued driving, striking a pedestrian at the intersection of Avenue R and Ocean Avenue. The pedestrian died later in the hospital. The driver is in stable condition.

This morning, Gelman allegedly was riding a southbound '1' train when someone called 911 to report a man matching Gelman?s description was on the train. Gelman allegedly stabbed a fellow passenger before leaving the train at 34th Street station and crawling under the tracks to a northbound '3' train, where he be began stabbing another victim in the head, according to Police Commissioner Raymond Kelly.

Police say they were able to apprehend Gelman at Times Square station after he began pounding on the motorman's door on the train saying that he was NYPD. Officers were waiting for him when the train arrived at Times Square.

Officials say Gelman had prior record of graffiti and a single charge of possession of crack cocaine.