Jose Herrera, 18, was found dead with multiple gunshot wounds to the head in front of an apartment building in Silver Spring on Sunday

An alleged member of the MS-13 gang who was shot dead on Christmas Eve in Maryland would be alive today if local authorities handed him over to Immigration and Customs Enforcement (ICE) months ago, the federal agency said on Thursday.

Jose Herrera, 18, was found dead with multiple gunshot wounds to the head in front of an apartment building in Silver Spring on Sunday.

An eyewitness told investigators they saw two Hispanic men wearing all black clothing flee the scene shortly after 6:30pm, when the gunfire was heard.

Officers who responded to the scene were unable to locate suspects, according to WJLA-TV.

ICE claims it lodged a federal detainer for Herrera, who came to the United States illegally from Honduras, in October.

Montgomery County's Department of Correction and Rehabilitation responded on Thursday, saying that while it did receive a detainer from ICE this past October, it was deemed 'not to meet the county's criteria' - resulting in Herrera's release.

ICE ‘places detainers’ on undocumented migrants ‘who have been arrested on local criminal charges and for whom ICE possesses probable cause to believe that they are removable from the US, so that ICE can take custody of the alien when he or she is released from local custody,’ according to the agency’s web site.

Scroll down for video

An eyewitness told investigators they saw two Hispanic men wearing all black clothing flee the scene shortly after 6:30pm, when the gunfire was heard. The image above shows the apartment building near where Herrera's body was found

Investigators are trying to figure out the motive for the killings. No suspects have been arrested as of Thursday

Herrera was arrested by the Montgomery Country Police in October for trespassing and fourth-degree burglary.

Two other alleged gang members who were with him – Jesus Antonio Ponce Flores and David Lagunes-Bolanos – were also arrested.

According to Fox 5 DC, two Maryland transit workers entered the home at 807 University Boulevard East in Silver Spring and ran into two of the gang members.

The transit workers were inspecting the home just before it was to be demolished in order to make way for a light rail project.

The Purple Line is a planned 16-mile east-west light rail line that will service commuters from Bethesda in Montgomery County to New Carrollton in Prince George's County.

The workers then heard footsteps and were approached by two young Hispanic men.

In October, Herrera and two other alleged members of MS-13 were arrested for trespassing and burglary after they were found in a vacant home in Silver Spring that was to be torn down (above)

One of those men, Flores, was wearing a black mask and was allegedly holding a gun.

When the workers left, they called the police.

Before the scheduled demolition, MS-13 allegedly turned the two-story house into a hideout with graffiti, a built-in bar, and a shrine to the ‘Saint of Death.’

After his arrest, Herrera was given a summons to appear before a judge.

But when he failed to do so, the judge issued a bench warrant.

Law enforcement officials then executed that warrant and arrested Herrera on December 12.

Ten days later, Herrera posted $100 bond and was released from custody.

ICE claims it lodged a federal detainer for Herrera, who came to the United States illegally from Honduras, in October. ICE officers are seen in the above stock image detaining a suspect in Los Angeles in February

Local authorities allowed Herrera to post bond despite the pending detainer lodged by ICE.

Two days after his December 22 release, Herrera was shot dead.

‘ICE lodged detainers on three individuals - Jesus Ponce-Flores, David Lagunes-Bolanos, and Jose Herrera-Guzman - with the Montgomery County Detention Center,’ ICE said in a statement.

‘ICE officials are not permitted to screen foreign nationals booked into Montgomery County's custody for removability, and as a result, were unable to determine the immigration status of a fourth individual who had not had any previous encounters with US immigration officials.

‘Jose Herrera-Guzman was released from custody on or about Dec. 22, without notification to ICE, even though a detainer was lodged in October.’

Montgomery County has long maintained that while it welcomes undocumented migrants, it does not act as a 'sanctuary' county.

ICE, however, says the county has not always cooperated in handing over undocumented aliens who have been suspected of criminal activity.