The man accused of fatally shooting a fellow passenger aboard a Q train on Sunday has been taken into custody, police said.

Andrew Abdullah, a 25-year-old with a lengthy criminal history, was arrested on Tuesday afternoon, the NYPD announced in a tweet. Further information about his arrest was not immediately available.

Abdullah is accused of firing a single shot into the chest of Daniel Enriquez on the last car of a subway that was traveling over the Manhattan Bridge on Sunday afternoon. He exited the train at Canal Street and eluded police for roughly 48 hours.

A judge ordered Abdullah held without bail Wednesday after his arraignment on charges of murder and criminal possession of a weapon. He pleaded not guilty and was due back in court on Friday, his counsel said.

Witnesses told police the shooter was pacing around the train prior to pulling out a gun. The victim, a 48-year-old researcher at Goldman Sachs, was not believed to have known the perpetrator, according to police.

Records show Abdullah has several previous run-ins with police in Brooklyn and Manhattan. In 2017, he was arrested along with a dozen gang members for his alleged involvement in a string of shootings and robberies in Harlem, according to a complaint by the Manhattan District Attorney’s Office. He served more than a year and a half in city custody, before pleading guilty to conspiracy in the 4th degree and attempted criminal possession of a weapon in the second degree.

“Again and again his repeat offenses were not enough to keep him off our streets,” NYPD Commissioner Keechant Sewell said Tuesday, pointing to an open gun charge he had from 2020, blaming the fact that New York judges are not allowed to consider dangerousness when setting bail, a rollback to New York’s bail laws Mayor Eric Adams has lobbied for in Albany.

But court records from the Manhattan District Attorney’s office show a judge had set bail at $100,000 and bond at $200,000, for Abdullah that year. After several months in custody, he’d been able to post it which was why he was out, according to the District Attorney’s office.

Since his release in 2019, he has been rearrested at least three additional times. In January 2020, he was allegedly found with a loaded Glock .40 when a police officer spotted him smoking marijuana and tried to arrest him. A judge set that bail at $100,000 and Abdullah posted it, according to court records.

That case is pending. In October of 2020, he was arrested for a domestic violence incident, allegedly hitting and pushing a woman while she held her baby, according to the Manhattan District Attorney's ooffice. He’s also due back in court in June for that charge.

Last month, Abdullah was arrested another time after he allegedly drove away in a Brooklyn man’s 2018 Lexus. That case is also pending.

A lawyer who has previously represented Abdullah did not immediately respond to a request for comment.

This story has been updated with additional information.