Principals in the Chicago Public Schools, who’ve long complained about their pay, are getting a raise along with their assistant principals, district officials announced late Friday.

They’re also getting a better pay structure as their careers progress, and starting next fall, anyone who opts to lead a “hard to staff” school will be offered a one-time $15,000 signing bonus they can keep if they stay for two years.

The pay bump brings the minimum earnings for a school leader in charge of students, teachers and budgets to $125,000 a year, up from $120,000 currently. Principals now can earn up to $169,000. As for assistant principals, pay will start at $103,000 and max out at $129,000.

CPS will spend $135.7 million this year on salaries for school leaders, up from $128.2 million on salaries for school leaders in September 2016.

Salary still will be based on a school’s enrollment so principals of large schools will be paid the most. Experienced well-paid teachers wouldn’t lose any pay if they decide to move into school administration.

A record number of principals resigned or retired during the bumpy 2015-16 school year, prompting CPS to find new ways to keep its school leaders in place. Surveys conducted by the Chicago Public Education Fund, which works to train and mentor principals, suggested that flagging pay was a problem.

“We hope that these changes reflect how deeply you are valued and how grateful we are for your role in providing every child from every community with the education they need to thrive,” read a letter from CEO Forrest Claypool and Chief Education Officer Janice Jackson principals received.

Chicago Principals and Administrators Association President Troy LaRaviere said the salary increases still left CPS behind many nearby suburban districts, and city principals were expected to do more work with more challenging students.

“As of the 2016-2017 school year, there were at least 54 school districts within a 15 to 45 minute driving distance of Chicago whose median principal salaries are higher that those of CPS principals,” he said. More than a dozen of those districts paid $40,000 more, he said, adding, “The new compensation system does next to nothing to change this.”