A man was fatally shot after he allegedly shot a Yonkers, NY, detective in the abdomen, Yonkers Police Commissioner John Mueller said Wednesday afternoon.

The detective, a 27-year member of the department, was in critical but stable condition, the commissioner said.

"He lost a tremendous amount of blood, but thankfully we think he's going to be OK," Mueller said.

The exchange of gunfire took place inside a local bodega shortly after 2 p.m., Mueller said during a press conference.

Police say members of the Westchester Safe Streets Task Force attempted to arrest three men as part of a firearms investigation, two of whom were in the bodega when one of the men tried to push past the detective inside the deli and shot him in the stomach, LOHUD reports.

An FBI agent, who is part of the task force, then returned fire, shooting the suspect once, Mueller said, noting he believes the agent was the only member of the task force to discharge his weapon.