A 22-year-old man was shot Monday morning while walking to the Leighton Criminal Courts Building in the Little Village neighborhood on the Southwest Side.

About 9:30 a.m., he was walking to the courthouse in the 2500 block of South California when someone fired shots from a white van that was driving by, according to Chicago Police.

The man suffered six gunshot wounds to the groin area, and was taken in critical condition to Mount Sinai Hospital, police said.

Two off-duty police officers saw the shooting and pursued the shooter, who was taken into custody, police said. Charges were pending.

A weapon was also recovered from the area, police said.

Police initially said the man was entering the courthouse in the 2600 block of South California when he was shot.