CHICAGO (AP) — A convicted felon who pleaded guilty to charges that he opened fire on police in 2020, wounding three officers, was sentenced Monday to 31 years in prison.

The sentence comes two months after Lovelle Jordan, 27, pleaded guilty to one count of attempted murder and five counts of aggravated battery to a peace officer, the Chicago Tribune reported.

The charges stem from a July 2020 shooting that came shortly after Jordan was arrested in connection with a carjacking in downtown Chicago. Police had driven him to a station on the city’s Northwest Side.

PREVIOUS COVERAGE: Carjacking suspect charged in shooting of 3 Chicago officers

Officers patted him down but while they found he was carrying drugs in his pockets, according to authorities, they did not see that he was carrying a small loaded pistol. Jordan was handcuffed behind his back.

At the time of the shooting, Chief of Detectives Brendan Deenihan said that officers had searched Jordan before he was transported but he apparently had the gun “extremely secreted, probably very close to his private area” and was able to retrieve the weapon during the ride to the station.

Jordan was somehow able to move his cuffed hands from behind his back, grabbed the gun, and opened fire when an officer opened the door for him at the station.

Dozens of shots were fired in a shootout between Jordan and three officers were shot. Jordan was also shot and was left paralyzed.