Sergeant Shoots Attempted Mugger Who Pulled Out Gun When He Found Cop's Badge: Officials

"Shoot him, shoot him," one of the suspects allegedly yelled in Spanish after the officer's police badge was found.

An off-duty NYPD sergeant shot a would-be mugger when the man and two others tried to rob the officer at gunpoint, firing on the group after one suspect yelled to shoot the cop when they discovered his badge, officials said.

The officer, identified by reports as Sergeant Esteban Abreu, was at the corner of East 178th Street and Creston Avenue in the Bronx when three young men approached him about 4 a.m. Monday, police said.

They demanded his cellphone at knifepoint and as he handed over what the group demanded, the suspects discovered Abreu’s police badge, cops said.

Read: EMS Official Dies of Heart Attack After Responding to Car Crash Involving His Daughter

“Shoot him, shoot him,” one of the suspects allegedly yelled in Spanish. One of the men then pulled out a gun, police said.

Abreu pulled out his off-duty gun and fired, hitting one of the men in the torso.

Abreu was taken to Jacobi Hospital to be treated for tinnitus, or ringing of the ears.

The 18-year-old wounded suspect was taken to Saint Barnabas Hospital in stable condition.

Police said they recovered two knives found from the hospitalized suspect.

Read: Attacker Who Ambushed Cop Told Investigators 'I Did It In The Name of ISIS'

Charges are pending and the investigation is ongoing, officials said.

The other two suspects, described as Hispanic men who appeared to be in their 20s, fled the scene, cops said.

One man was last seen wearing a red sweater and was carrying a gun, while the other man was wearing a black jacket and was armed with a knife, authorities said.

Watch: This Man is Behind Bars After Sending Selfie to Police for Better Mugshot