New York (CNN) A political war of words between New York City and Washington has escalated after a US Immigration and Customs Enforcement agent shot an apparently unarmed man in Brooklyn.

ICE said two federal officers were "physically attacked" and had to be taken to a hospital after the arrest of an undocumented Mexican immigrant Thursday morning.

An agent fired a weapon and struck another another man suspected of interfering with the arrest of Gaspar Avendano-Hernandez -- identified by ICE as a twice-removed undocumented immigrant with a 2011 assault conviction.

But Kevin Yañez Cruz, who said he witnessed the incident, told CNN Friday the men only resisted outside the Brooklyn home because the agents weren't wearing badges or ICE uniforms and did not identify themselves as law enforcement.

"We were unarmed. The agents were the only ones with weapons," said Yañez Cruz, whose 26-year-old brother, Erick Diaz, was shot in the face during the confrontation. "They didn't say a word."

The bullet fired by the agent first hit Diaz in the hand and then injured his face, a law enforcement official familiar with the incident told CNN.

Diaz was in a stable condition at Maimonides Medical Center in Brooklyn, according to a hospital spokeswoman.

Yañez said Avendano-Hernandez is his mother's boyfriend. Avendano-Hernandez was also taken to a hospital, but the nature of his injuries was not immediately known. He was escorted out of the hospital on Friday by federal agents, according to a video posted on social media. In the video, protesters could be heard chanting, "You're not alone! You're not alone!"

CNN reached out to ICE to respond to Yañez Cruz's comments about the ICE agents not wearing badges or uniforms. CNN also asked whether Diaz and Avendano-Hernandez face any charges. ICE did not immediately reply.

Shooting sparks protests, heightens tensions between New York and Washington

JUST WATCHED Sanctuary cities: What you need to know Replay More Videos ... MUST WATCH Sanctuary cities: What you need to know 01:39

During Tuesday's State of the Union Address, Trump blasted what he called "deadly" sanctuary policies and singled out New York for releasing an undocumented immigrant wanted by ICE who allegedly raped and killed an elderly woman.

The next day, the Department of Homeland Security responded to a New York state law passed in December that allows undocumented immigrants to get driver's licenses while protecting applicants' information from immigration enforcement agencies.

The acting secretary of Homeland Security said New York state residents can no longer participate in certain Trusted Traveler Programs, including Global Entry, due to provisions in the state's new "Green Light Law" supporting undocumented immigrants.

ICE says city 'forced' agents to locate undocumented immigrant 'on the streets of New York'

New York City police had arrested Avendano-Hernandez on Monday for alleged possession of a forged instrument, a felony, according to a statement from Rachael Yong Yow, a Homeland Security Investigations spokeswoman in New York.

But Avendano-Hernandez was released from local custody before ICE could lodge an immigration detainer, the statement said.

"This forced ICE officers to locate him on the streets of New York rather than in the safe confines of a jail," Yong Yow said.

The shooting is being investigated by the Homeland Security's Inspector General, according to the statement.

"Interfering with or obstructing with their duties is a crime, and people who do so are subject to arrest and potential criminal prosecution," the statement said of ICE agents.

ICE first encountered Avendano-Hernandez at the Rikers Island Correctional Facility in January 2011. He was served notice to appear in immigration court, the statement said. An immigration judge ordered him removed and he was returned to Mexico in March of that year.

The US Border Patrol captured Avendano-Hernandez about one month later and he was again returned to Mexico, according to the statement. On Thursday, he was taken into custody "after attempting to obstruct his arrest," the statement said.

The Mexican Consulate in New York said it was helping to secure lawyers for Diaz and Avendano. Both are Mexican nationals but Diaz is a "documented legal alien" who arrived in the US about week ago on a tourist visa, said press officer Jorge Tuddon.

Avendano-Hernandez is being represented by the Legal Aid Society, which declined to comment on the case. It's unclear whether Diaz had retained an attorney.

New York mayor says ICE 'created a very dangerous situation'

Mayor Bill de Blasio on Friday said the shooting was not "about our safety and security" but about "ICE acting as a wing of the Donald Trump campaign committee" and "about demonizing immigrants and people of color."

"ICE (is) doing its own thing, creating havoc in many cases as they did here, creating danger, which they did here,' de Blasio told The Brian Lehrer Show on WNYC radio. "They created a very dangerous situation that the NYPD had to come in and stabilize and address."

Brooklyn Borough President Eric Adams, a former New York police officer, joined other local elected officials at news conference Friday and said ICE agents should be required to wear body cameras.

Responding to ICE's statement about Avendano-Hernandez being released from jail, Adams said, "Shame on ICE to attempt to blame the New York City Police Department for their action. NYPD did not shoot a young man. ICE shot that young man... This is what we have been afraid of when we talk about having ICE in our city. "

On Thursday night, as protesters gathered outside the hospital where Diaz was taken, a leading advocacy group linked the shooting to the broader immigration policy debate.

"Trump and ICE have again shown why we are right to kick ICE out of New York," said Nadia Marin, co-executive director of the National Day Laborer Organizing Network. "Another racist stunt, another reckless shooting - two more reasons why hundreds of cities have decided they are safer without ICE in their communities."

Homeland security criticizes 'irresponsible claims'

The Homeland Security Investigations statement said, "Irresponsible claims suggesting that people are allowed to flee or resist ICE officers does a disservice to the communities these groups claim to support by spreading misinformation. This is extremely reckless and places all parties in jeopardy."

In September, an ICE officer opened fire and wounded a man in a Tennessee grocery store parking lot while attempting to make an immigration arrest. The officer fired two shots after a man he was trying to arrest during a fugitive operation drove toward him while fleeing, ICE spokesman Bryan Cox said.

While ICE operations are a regular occurrence across the US, shootings as they unfold are rare.