A man with a concealed-carry license was commended for coming to the aid of Cicero police who were engaged in a shootout with a man who shot and wounded an officer near the Stevenson Expressway Thursday, authorities said.

Cicero Police Officer Luis Duarte, 31, was shot four times during the encounter near the 4200 block of South Cicero Avenue during the evening rush hour, but it might have been worse if the armed citizen hadn’t stepped in, officials said.

“We were lucky enough to have a citizen on the street there who’s a concealed-carry holder, and he also engaged in gunfire,” Cicero Police Supt. Jerry Chlada Jr. said outside Mount Sinai Hospital, where Duarte was undergoing surgery Thursday night.

On Friday, police said Duarte was recovering following a series of surgeries at the hospital and was in good condition.

Just after 5 p.m., Duarte and his partner tried to pull over a vehicle in the 3900 block of South Cicero for a “routine traffic stop,” but the car took off onto the ramp to southbound Interstate 55, according to police.

When the officers boxed the car in traffic at the top of the ramp, the man at the wheel got out and began firing an automatic weapon, hitting Duarte twice in the arm, once in the leg and once in the abdomen, officials said.

The suspect kept running and shooting at the officers as Duarte and his partner returned fire, officials said. That’s when someone sitting in traffic on Cicero Avenue got out of his car and began shooting at the suspect as well, Chlada said.

The suspect was hit once and taken to Stroger Hospital in serious condition, according to Chicago police. It wasn’t clear if the bullet that hit him came from the officers or the concealed-carry holder.

Cicero town President Larry Dominick commended the citizen shooter, who has not been named.

“He got out and started helping the police, which is something I’ve got to be proud of,” Dominick said.

Illinois State Police and Chicago police brought much of rush-hour traffic to a standstill with an escort to get Duarte to Mount Sinai.

“Our thoughts and our prayers are with our officer and his whole entire family, and I ask that the public keep them in their prayers as well,” a visibly distraught Chlada said.

The suspect, whose name has not been released, is in Chicago police custody because the shooting happened within city limits.

Illinois State Police are investigating the officers’ use of force.