A New York City man accused of randomly gunning down a fellow passenger on a subway train last month pleaded not guilty on Wednesday to second-degree murder and two counts of criminal possession of a weapon. 

Andrew Abdullah, 25, is being held without bail. 

He's accused of pacing back and forth on a Q train from Brooklyn to Manhattan on May 22 then allegedly pulling out a firearm and shooting 48-year-old Daniel Enriquez "without provocation" in the chest, NYPD Chief of Department Kenneth Corey said. 

Andrew Abdullah NYC subway shooting

New York Subway shooting suspect Andrew Abdullah is escorted by New York City Police Detectives in to a Police Precinct in New York City, U.S., May 24, 2022.   (REUTERS/Brendan McDermid)

Daniel Enriquez, a 48-year-old Goldman Sachs employee, was rushed to a local hospital for treatment but was pronounced deceased. 

NYC ACCUSED SUBWAY SHOOTER OF GOLDMAN SACHS BANKER HAS 19 PRIOR ARRESTS

The only words that witnesses heard Abdullah say before the attack were, "No phones," according to the NYPD. 

Abdullah allegedly fled the train once it came to a stop in Manhattan and handed the weapon, a 9mm Ruger that was reported stolen, to a homeless man. Officers stopped him just minutes later, but Abdullah had already changed his appearance and they let him go. 

New York Subway shooting suspect Andrew Abdullah

New York Subway shooting suspect Andrew Abdullah is escorted by New York City Police Detectives as he exits arrested from the Police Precinct in New York City, U.S., May 24, 2022.   (REUTERS/Eduardo Munoz)

Abdullah was arrested two days later after investigators spread his photos on social media. 

His attorney, Kristin Bruan, told Fox News Digital on Wednesday that five witnesses who were on the subway train during the incident could not identify Abdullah in a lineup. 

"Two or three of them identified the wrong person," Bruan said, noting that she is yet to receive any discovery from prosecutors. 

ACCUSED BROOKLYN SUBWAY SHOOTER FRANK JAMES: JUDGE ORDERS SUSPECT HELD ON 'PERMANENT DETENTION' PENDING TRIAL

NYPD Commissioner Keechant Sewell told reporters Abdullah was "well known to the criminal justice system."

"But again and again, his repeat offenses were not enough to keep him off our streets," Sewell said after his arrest. "His criminal history stretches back to 2006 and includes charges of felony assault, robbery, attempted murder and a still open gun charge from two years ago."

Daniel Enriquez, an investment researcher at Goldman Sachs, was riding the Q train into Manhattan when an unidentified man shot him at close range

Daniel Enriquez, 48, was shot and killed Sunday while riding the New York City subway (LinkedIn/Daniel Enriquez)

Griselda Vile, the victim's sister, urged officials to make changes so that Enriquez's death will not be in vain. 

CLICK HERE TO GET THE FOX NEWS APP

"I’m only meeting with the press because I’m pleading that this not happen to another New Yorker, that it does not happen to another family," Vile previously told Fox News. 

"I don’t want my brother just to be a passing name in the media, a passing name in our normalcy, post-pandemic." 

Fox News's Shelly Xu, Stephanie Pagones, and Ronn Blitzer contributed to this report.