Federal immigration officials arrested an MS-13 gang member Thursday after they received word he threatened to shoot police in New York City, a law enforcement source told Fox News.

Immigration and Customs Enforcement (ICE) agents took Armando Clemente Ramos into custody after it was alleged he threatened officers in the 41st precinct in the Bronx -- the same precinct where two officers were shot less than a week ago.

Ramos, who is undocumented, is being held on immigration-related charges.

"Homeland Security Investigations (HSI) was made aware of a threat to the law enforcement community here in New York City. As a result, HSI special agents investigated the threat and subsequently made an arrest," an HSI official told Fox News in a statement. "The investigation is still ongoing."

The New York Daily News cited a source who said Thursday's arrest was intended to "get the guy off the street" and noted additional charges could be coming.

Ramos' arrest came on the same day the New York Police Department sent out an alert to all precincts of a "credible threat" against officers.

The Sergeants Benevolent Association, the largest NYPD labor union, posted a screen shot of the warning and circulated it on Twitter.

"WARNING - MUST READ NYPD COPS ASSASSINATION THREAT - the attached noice has been distributed throughout NYPD Commands. REMAIN ALERT - respond with back up on all 9/11 calls," the tweet said.

The memo reads, "INVESTIGATIVE UNITS HAVE RECEIVED A CREDIBLE THREAT OF AN INDIVIDUAL THAT MAY ATTEMPT TO SHOOT A NYPD MOS (member of service), IN PARTICULAR, A 41 PCT MOS. ALL MOS ARE BEING ADVISED TO BE VIGILANT AND ALERT. STATION HOUSE SECURITY MUST BE POSTED ON ALL TOURS. PLEASE ADVISE ALL MOS AND CONTINUE TO READ THIS MESSAGE AT ROLL CALLS UNTIL FURTHER NOTICE."

It is unclear if Ramos' arrest is directly related to the alert memo.

The threat against the Bronx officers comes on the heels of last weekend's shootings. In that case, the suspect, Robert Williams, allegedly approached a police patrol van Saturday in the Bronx and shot the officer inside. The next morning, he walked into the 41st precinct station and started shooting, this time hitting a lieutenant.

Williams, who has spent nearly half his life in prison, was arrested and charged Monday with 14 counts of attempted murder.

CLICK HERE FOR THE FOX NEWS APP

"This is not a crime gone bad," Police Commissioner Dermot Shea said. "This is not a liquor store robbery interrupted that a tragedy erupts from. This is a premeditated assassination attempt."

The attacks come amid tensions between the city's 34,000-member force and the administration of New York Mayor Bill de Blasio, who has implemented several measures that critics say are hostile to police. The mayor has also struggled to defend an increase in crime. In January, serious crime rose by almost 17 percent from the same month in 2019.