A man allegedly attempting to ambush a police officer in Baltimore Sunday morning was shot by the officer and reportedly told first responders “you should have finished me off” as he was being treated.

Baltimore Police Department officials are calling the incident an attempted suicide-by-cop, FOX45 reported.

The shooting occurred around 9:30 a.m. while the officer was writing a report in his vehicle. The officer said he saw a man approaching his cruiser with a gun pointed at him. The officer fired several shots through his car window, hitting the man at least once. The officer was uninjured.

Police recovered an unloaded 9-mm. handgun at the scene.

As he was being treated, the alleged gunman, who has not been identified, told officials, “You should have finished me off, you should have finished me off.” He is in critical condition at a local hospital.

The officer has been placed on administrative leave pending an investigation.