CHICAGO (CBS) — Carjackers targeted a black BMW in the Ashburn neighborhood Friday morning, but what they didn’t know was the driver of the SUV was an armed off-duty Chicago police officer.

The officer exchanged gunfire with the suspects, but they got away.

Witnesses said the off-duty officer was stopping at his regular barbershop at 79th and Hamlin to get a haircut, but before he could get out of his car, three suspects jumped in.

“They tried to carjack him,” Corey Felton said.

Felton said he can’t believe what unfolded outside his barbershop window.

“I heard gunshots, and I just happened to look out, and my next client was outside. He was a police officer, and he was returning gunfire with a suspect,” he said.

Police said the off-duty officer was sitting in his SUV when an offender opened the passenger side door, showed a gun, and demanded the vehicle. The officer got out, announced his office, and pulled out his gun, which led to a shootout.

“I see three guys on the sidewalk. I see him shooting back, and they shooting at him,” Felton said. “About 10-12 shots in all.”

Felton said he didn’t recognize any of the carjackers.

Keith Harris also heard the shots.

“He was returning fire and he shot like three shots,” Harris said. “It was crazy. 8:45 in the morning, you don’t expect nothing like that.”

Harris said the officer took cover behind this white Jeep as one of the suspects continued shooting at him. Bullets shattered the passenger side window and pierced the passenger side door of the Jeep.

“They ran into the wrong guy at the wrong time,” Harris said.

No one was injured in the shootout.

“No one got hurt, but I wish they had gotten them all, all three. I wish they had arrested them,” Felton said.

All three suspects ran into a waiting vehicle and sped off.

No one was in custody Friday afternoon. Area Central detectives were investigating.