(NEW YORK) — The alleged suspect in the unprovoked fatal shooting of 48-year-old Daniel Enriquez on a Q train in New York City is in police custody, according to law enforcement sources.

Sources identified the suspect as Andrew Abdullah, a 25-year-old man from Brooklyn with about 20 prior arrests, including an outstanding gun charge from last year. He also has prior arrests for assault, robbery, menacing and grand larceny, sources said.

Abdullah has three cases that are still pending, including an April arrest for fourth-degree criminal possession of stolen property for allegedly being found with a stolen motorcycle, as well as a June 2021 arrest for violating a protective order and March 2021 arrest for assault.

Detectives have also recovered the gun used in the shooting.

It is believed the suspect handed the gun to a homeless man as he fled the Canal Street station. The homeless man then apparently sold the gun for $10 to a third person, who reported it to police, the sources said.

The New York Police Department released surveillance photos Monday of the suspect believed to have shot Enriquez taken shortly after he exited the subway.

The motive for the shooting is still unknown.

In January 2020, Abdullah was arrested as part of a gun-related case and in May 2017 he was charged with second-degree attempted murder as part of an 83-count federal indictment of the Harlem-based street gangs Fast Money and Nine Block. Abdullah was sentenced to three years in federal prison, but served just four months before being released in 2019.

Witnesses say the suspect, alleged to be Abdullah, was pacing back and forth in the last car of a Manhattan-bound train around 11:45 a.m. when he pulled out a gun and fired it at Enriquez unprovoked, according to NYPD Chief of Department Kenneth Corey.

The shooting comes a little over a month after a Brooklyn subway rider opened fire on a train car, wounding 10 people. The suspect in that shooting, Frank James, was arrested one day later in lower Manhattan.

Transit crime is up 62.5% in the city year-to-date from 2021, according to NYPD statistics.

Copyright © 2022, ABC Audio. All rights reserved.