ICE was one of the law enforcement agencies involved in 26-year-old Ramiro Gutierrez's burglary arrest in December but then did not confirm that he was undocumented so he was freed on bail.
Only after his arrest earlier this week for the fatal shooting did ICE determine "he entered without inspection" at an unknown prior date.
ICE has now placed a detainer on Gutierrez for possible deportation.
The subway shooting happened around 12:45 p.m. on Sunday at the 90th Street Station at Roosevelt Avenue and Elmhurst Avenue in Jackson Heights.
Investigators say the incident stemmed from a confrontation that started on a Manhattan-bound 7 train involving at least three individuals and the victim.
"At some point, this confrontation turns physical, and as the train approached the 90th Street Station, the dispute spills onto the platform," NYPD Chief of Detectives Dermot Shea said. "There (on the platform) is what you see in the widely circulated viral video. A gun appears, and we have an individual shot. We believe approximately five or six shots are fired during this incident, striking the victim multiple times in the face."
The video showed the men wrestling with the victim on the ground. Punches were thrown until the man in the gray jacket stood up and pulled out a gun.
Eyewitness News has frozen the video there, because, in the next few seconds, the gunman fired the weapon six times, killing the victim.
Subway riders ran from the terrifying scene.
The victim, 20-year-old Abel Mosso, was pronounced dead at the scene. Police said he had also been arrested previously as a gang member, although it was not MS-13.
Police arrested Gutierrez Monday morning. Shea said that Gutierrez is known to police as an MS-13 gang member.
The determination was not made until Tuesday, officials said, even though ICE was one of the law enforcement agencies involved in Gutierrez's burglary arrest in December.
"He has been arrested before in New York City and he has been part of a criminal group gang case before in New York City," Shea said.
He is charged with second-degree murder, first-degree gang assault and two counts of criminal possession of a weapon. If convicted, Gutierrez faces up to 25 years to life in prison.
Gutierrez was arraigned Tuesday night in Queens Criminal Court.
President Trump mentioned the incident in Tuesday night's State of the Union address.
"The savage gang MS -13 now operates in at least 20 different American states and they almost all come through our southern border," said the president. "Just yesterday, an MS-13 gang member was taken into custody for a fatal shooting on a subway platform in New York city. We are removing these gang members by the thousands, but until we secure our border, they are going to keep streaming right back in."
Meantime, two other suspects remain on the run, and police released images of those wanted for questioning in the case.
Shea said they have seen a number of gang-related incidents in parts of Queens recently.
"It's not the first time we saw MS-13, but we have seen them in a few troubling incidents or they are suspected in a few troubling incidents throughout Queens in the last year or two," he said.
Crimes have ranged from burglaries to drug dealing, he said.
Shea also added that crimes in general and on subways remain at record lows.
"The subways are safe," he said.
When asked about a possible uptick in MS-13 activity in New York City, Shea said, "In terms of an uptick in MS-13, there have been a number of incidents in the last six to 12 months, but in terms of 'uptick' we do not see a lot of MS-13 traditionally in NYC. You have one incident like this, and obviously one is one too many. Think about a month ago at the terrible incident in the Rockaways, where an individual was lured to a park and killed. That was then connected to another incident across the border in Nassau County. But by and large, we put a lot of emphases and focus on our precision policing on gangs, the violence they drive in NYC, and when you rank the gangs we see and we target, MS-13, obviously, an incident like this will catch our attention. but I wouldn't put them at the top of the pecking order that we see day in and day out."
* More Queens news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube