The state legislative session ended Wednesday night with no deal for Mayor Bill de Blasio to retain control of city schools.

The extension for mayoral control of schools is set to expire at the end of the month.

Lawmakers had been negotiating an extension, but they could not agree on provisions for charter schools.

According to sources, Gov. Andrew Cuomo tried to reach a compromise by offering a one-year extension without any mention of charter schools.

A side letter would have allowed lawmakers to deal with defunct charter school locations at a later date, but Assembly Speaker Carl Heastie rejected the compromise.

State Senate Republicans issued a statement Wednesday night that they could not conclude all the business and would leave.

Lawmakers could return at some point this year for a special session to work on bills they could not complete Wednesday night, including mayoral control of city schools.

There are a number of local tax extensions that Senate Republicans want, but they are heading back to their districts Wednesday night as the legislative session ends.

If lawmakers do not convene for a special session, they would not meet until January of 2018.

Absent any legislative action, the city would go back to the old system of local school boards July 1.