GRAVESEND, Brooklyn — A man was shot in the face in Brooklyn Thursday morning when an ICE officer fired their firearm during a dispute, police said.

The shooting occurred around 8:15 a.m. in the vicinity of West 12th Street near Highlawn Avenue in the Gravesend neighborhood, according to authorities.

ICE officers were trying to arrest Gasper Avendano-Hernandez, a Mexican citizen and undocumented immigrant who has been removed from the country twice before, when they were "physically attacked," according to a statement released by ICE.

Eric Diaz, 26, was shot. His brother Kevin Yanez Cruz was there when it happened.

"He shoots my brother, shoots him right in his face," he said. "It felt like an explosion."

Cruz is in stable condition.

Avendano-Hernandez is dating Diaz' mother. Diaz apparently tried to intervene.

“The New York Police Department arrested Avendano-Hernandez Feb. 3 for possession of a forged instrument, a felony criminal charge. ICE attempted to lodge an immigration detainer after his most recent arrest, however the subject was released from local custody before ICE could lodge a 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.”

Avendano-Hernandez and another person were taken into ICE custody, according to the agency before being sent to a hospital. He will be back in custody once his treatment is done, according to the Mexican consulate.

He'd previously been arrested in 2016 for driving with a forged license plate. ICE said that's what put him on their radar. He'd also been arrested for domestic violence in 2011.

The victim was taken to the hospital in serious condition, authorities said. Two ICE officers were also taken to the hospital for treatment of undisclosed injuries.

The ICE Office of Professional Responsibility will investigate the shooting.

