Chicago Police Superintendent Garry McCarthy loathes concealed carry, and so it must be particularly painful for him today to deal with the fact that it was a concealed carry permit holder who stopped a madman firing into a Chicago crowd.

A Logan Square man was ordered held on no bail Sunday after prosecutors said he fired a handgun into a crowd of people Friday night.

But 22-year-old Everardo Custodio wasn’t in Cook County bond court to hear Judge Peggy Chiampas deny him bail.

He was at Advocate Illinois Masonic hospital, being treated for gunshot wounds to the shin, thigh and lower back.

As Custodio was allegedly opening fire on the crowd Friday, an Uber driver with a concealed-carry permit picked up his own firearm and shot Custodio multiple times, according to prosecutors and court records.

The Uber driver, a 47-year-old Little Italy resident, has a firearm owner’s identification card and acted in self-defense and the defense of others, Assistant State’s Attorney Barry Quinn said Sunday in bond court.

No charges have been filed against the Uber driver, police said.

The cab driver and attempted murderer Custodio were on opposite sides of North Milwaukee Avenue shortly before midnight when a group of people came walking by on the cab driver’s side of the street. When they got close, Custodio pulled a hidden weapon and opened fire on them. As panicked people scattered and ran for cover, the cab driver got out of his vehicle opened fire on the violent criminal in their defense.

The concealed carrier fired six shots and hit Custodio multiple times, ending the 22-year-old’s attempted murder spree.

None of the people saved by the armed Uber driver were apparently hit by Custodio’s shots.

There were five people murdered and 22 injured in Chicago this weekend in a city still dealing with the poverty created by decades of single-party misrule in what was one of the nation’s largest and most violent “gun-free zones.”

There may have been more people dead and injured if it wasn’t for the fact that the courts finally forced Chicago to allow law-abiding citizens to carry concealed handguns to defend their lives, and as seen here, the lives of others.