A New York City parking garage attendant was hit with an attempted murder charge after confronting an armed thief and wrestling the gun away before opening fire on the suspect.

Moussa Diarra, 57, is also charged with assault and criminal possession of a weapon in connection with the incident that occurred at around 5:30 a.m. Saturday morning. 

The attendant had observed a man looking into cars on the second floor of the West 31st Street garage in Manhattan, police said, according to the New York Post. Diarra suspected the man was stealing, so he brought him outside and questioned him about what was inside his bag.

NEW YORK CITY WOMAN ABDUCTED, RAPED IN HANDCUFFS AND LEG SHACKLES ON BUS FOR HOURS: POLICE

A New York Police Department (NYPD) vehicle

A New York City parking garage attendant was hit with an attempted murder charge after confronting an armed thief and wrestling the gun away before opening fire on the suspect. (Photographer: Michael Nagle/Bloomberg via Getty Images)

The man then pulled a gun on Diarra, who attempted to grab the firearm. The gun was fired, leaving Diarra with a shot to the stomach and grazed in the ear by a bullet.

Diarra proceeded to turn the firearm on the potential thief and shot him in the chest.

The alleged thief, 59-year-old Charles Rhodie, was also charged with attempted murder, assault and criminal possession of a weapon. He also faces a burglary charge, police said.

NYPD officer in marked vehicle

Moussa Diarra, 57, is charged with attempted murder, assault and criminal possession of a weapon in connection with the incident in the parking garage. ((Photo by Spencer Platt/Getty Images))

Diarra and Rhodie were transported to Bellevue Hospital in stable condition after Saturday's incident at the parking garage.

The charges against Diarra for defending himself against an attacker come after a similar incident last year. In July, Manhattan bodega clerk Jose Alba was charged with murder after a confrontation in the store with an angry customer who attacked him behind his counter. Alba stabbed and killed the attacker in self-defense but found himself at the Rikers Island jail charged with murder.

NEW YORK CITY SUSPECT IN GAY BAR ROBBERIES, DRUGGINGS INDICTED ON CHARGES OF GRAND LARCENY AND IDENTITY THEFT

Alvin Bragg

A similar incident unfolded last year when a bodega clerk was charged with murder for fatally stabbing his attacker. District Attorney Alvin Bragg later dropped the charge after public pressure. ((Photo by Michael M. Santiago/Getty Images))

CLICK HERE TO GET THE FOX NEWS APP

Alba spent six days in jail until District Attorney Alvin Bragg dropped the murder charge amid intense public pressure.