A Yonkers, NY, detective critically wounded when he was shot in the abdomen during an undercover gun sting with federal agents in the Westchester County city a day ago has been identified as Brian Menton, the local police union president said Thursday.

Menton was hit in the abdomen and suffered serious injuries, along with extensive blood loss in the shootout but is expected to survive, a senior law enforcement official with knowledge of the case told NBC New York.

The suspect was killed at the scene by an FBI agent.

The detective, a decorated officer with many past gun-related arrests during his years of service, had been set to retire in the coming days after 27 years with the Yonkers department, according to law enforcement sources.

Menton was working with the FBI's Westchester Safe Streets task force on a gun investigation assignment at the time of the shooting inside a deli. The plainclothes officers were without body cameras but with FBI agents when the law enforcement officers moved in to arrest three suspects as part of their ongoing investigation.