The suspect who allegedly gunned down Chicago police Commander Paul Bauer near City Hall earlier this month received an unusually light sentence for major parole violations in 2007, court records show.

The documents, reviewed by the Chicago Sun-Times, reveal that Bauer's accused killer, Shomari Legghette, dodged up to 30 years in prison when he was booked for the violations that year.

At the time of his 2007 sentencing, Legghette was on parole following an armed robbery conviction that landed him a 16-year sentence, and prison time from 1998 to 2005.

FUNERAL HELD FOR POLICE COMMANDER WHO MADE 'ULTIMATE SACRIFICE'

Records show that police found Legghette in the South Side in 2007 with $1,800 in cash, body armor, a chrome revolver, and a baggie of heroin, the Sun-Times reported.

But instead of pursuing felony charges for those parole violations, records show, prosecutors opted to send Legghette to prison for only a few weeks after he pled guilty to a lesser charge of possessing a weapon with a defaced serial number.

It was unclear why prosecutors opted not to pursue Legghette's more serious alleged violations.

"There could have been problems with evidence, problems with witnesses," former Cook County Judge Dan Locallo told the Sun-Times.

The records reviewed by the Sun-Times also shed light on Legghette's troubled past, which included arrests for drug possession, disorderly conduct, and a gun-related offense -- all while living at different addresses.

Legghette's mother, Regina, reportedly took lengthy trips to visit him in prison -- including one ride in a van that crashed en route in 2003, leaving her critically injured, the paper reported.

Regina died shortly after Legghette was released from prison in 2005.