CHICAGO (Reuters) - A bill creating a new education funding formula in Illinois became law on Thursday, marking the end of the state’s latest political battle that had halted the flow of $6.7 billion in aid to 852 public school districts.

The bill, which passed the House and Senate earlier this week, was signed by Governor Bruce Rauner, who hailed the measure as historic for addressing funding disparities between wealthy and poor districts.

“We finally got it done. This is a historic day,” Rauner said at the bill signing ceremony in a Chicago school gymnasium.

Earlier this month, the Republican governor used an amendatory veto to extensively rewrite a previous school funding formula bill passed by the Democratic-controlled legislature in May, saying it unfairly bailed out the Chicago Public Schools (CPS). Without a method to distribute state aid, Illinois was prevented from sending state payments to schools as classes began for most students this month.

The subsequent bill, which became law on Thursday, will result in a $450 million funding boost for cash-strapped CPS through increased aid and pension contributions from the state and a local property tax increase.

Credit rating agencies had warned that districts that have slim reserves and are heavily dependent on state aid, including junk-rated CPS, could face financial pressure and potential rating downgrades from an extended school funding impasse.

“The most important thing is schools are going to get money,” said Roger Eddy, executive director of the Illinois Association of School Boards, referring to state aid dollars that will be released with the bill’s enactment.

Eddy and teachers’ unions were critical of a compromise measure inserted into the bill creating a tax credit pilot program to fund $75 million annually for private school scholarships.

The enactment by the legislature of a fiscal 2018 state budget in July over Rauner’s vetoes ended a political impasse that left Illinois without a complete spending plan for an unprecedented two fiscal years and ballooned its unpaid bill backlog to more than $15 billion.