A plan pushed by Chicago Police Supt. Eddie Johnson to lengthen sentencing for repeat gun offenders — which stalled last month amid concerns about changes in sentencing for big drug cases — took a big step forward on Thursday following negotiations between key state legislators and the governor’s office.

The measure cleared the Illinois Senate Thursday afternoon 35-9 and will now head to the House for a vote — although it won’t be taken up until after a two-week hiatus by the Illinois General Assembly.

The governor’s office on Thursday said that it drafted the amendment and worked with Sen. Kwame Raoul, D-Chicago, Sen. Michael Connelly, R-Wheaton, and House Republican Leader Jim Durkin, R-Western Springs, to reach a full agreement.

While a big intent of the bill was to target repeat gun offenders who are contributing to the bloodshed on Chicago’s streets, it also was originally designed to try to reduce the prison population by reducing sentencing for some drug crimes. That was a reform recommended by Gov. Bruce Rauner’s criminal justice commission.

The provisions that were taken out of the bill include those that would have lowered sentencing for those charged with more serious drug offenses. The initial language would have lowered the minimums depending on the charge. Provisions that would have lowered the offense classifications for drug offenses were also removed, the governor’s office and one of the bill’s co-sponsors, Raoul, said.

“What we were trying to do was take more of a judicious approach on those cases, not to let drug dealers off the hook,” Raoul said, while noting the negotiations with the governor’s office were productive.

“In my conversations with the governor’s office, historically, they have been clear that they want to work progressively, incrementally, on the criminal justice reforms so they had to proceed cautiously to do so,” Raoul said. “My preference would be to attempt to take a more aggressive bite out of the prison population. … I understand and appreciate that we’re doing this work on criminal justice reform. It’s not easy politically.”

An example of the change included a sentencing guideline that would have provided a range of six to 30 years for someone charged with manufacturing and delivering heroin amounts from 15-100 grams. It would have kept the same guidelines for those charged with between 15 and 400 grams of heroin — allowing for more drugs under the same sentencing guideline range.

Besides the drug offenses, the Senate bill would suggest judges sentence on the higher end of the existing sentencing ranges for aggravated unlawful use of a firearm and possession of a firearm by a felon for repeat gun offenders. While judges would use their own discretion, the bill may require them to explain their decisions.

Last month, Johnson came to Springfield to testify and push for the bill, which he said would create a “mental culture not to pick up a gun.” The police superintendent said passage of the bill would show repeat gun offenders “we’re serious about holding them accountable.”

Still, he conceded he was “uneasy” about the bill’s provisions that reduced the sentencing for those charged with possession of 100 grams or more of cocaine, heroin, or fentanyl. That’s the same issue that concerned Senate Republicans and Rauner. The bill came to a halt after passing committee amid those concerns, and Raoul vowed to work with the governor’s office to address the concerns — while noting it was Rauner’s executive order that prompted the creation of the commission in order to reduce the state’s prison population.

The initial measure was supported by Mayor Rahm Emanuel and Johnson and was sponsored by Raoul and Sen. Antonio Munoz, D-Chicago, in the Senate.

Emanuel on Thursday thanked Raoul, Munoz and the Senate for their support of the bill.

“If we are going to achieve the level of safety every resident deserves, we need a justice system that actually holds repeat gun offenders accountable for the crimes they commit and the violence they drive,” Emanuel said in a statement, adding the city also needs social supports like mentoring, investments and new predictive policing strategies.

Raoul said he also plans on filing a bill that will create a diversion program for first-time offenders charged with carrying a gun. Those offenders would have to have a documented and diagnosed incident of trauma that can be linked to them carrying a gun.