An off-duty Milwaukee police detective was shot while stopping a robbery in progress in the city's Historic Third Ward around 2 p.m. Thursday afternoon.

The incident began with a failed carjacking. At least one suspect reportedly followed the intended victim into a Shake Shack restaurant and tried to rob her, Fox 6 reports.

Officials said the off-duty Milwaukee Police Department detective intervened, announced that he was an officer and attempted to detain the suspect. 

A struggle ensued, and the suspect brandished a firearm, officials said. The suspect fired multiple shots at the off-duty detective – striking him multiple times – and fled the scene. The detective returned gunfire; at this time, there is no indication the officer's gunfire struck anyone.

Police took an 18-year-old man and a 17-year-old boy into custody after a pursuit ensued shortly after the shooting.

The detective is a 37-year-old man with seven years of service with the Milwaukee Police Department. He suffered life-threatening injuries but is listed in stable condition.

"Again, I want to remind everyone, this was an off-duty detective, probably just ordering food," said Milwaukee Police Chief Jeffrey Norman. "He went into danger without even hesitation. Absolutely proud of the men and women of the Milwaukee Police Department; proud that we are able to be professional on and off duty."