While school technology funding was the main education item on the ballot across the state on Tuesday, voters are also be setting up a debate over the control of New York City schools.

That’s because lawmakers have a looming task in the next legislative session: to revisit a 2002 law giving control of the city’s schools to its mayor. The law is set to expire at the end of June, meaning that lawmakers will have to agree on any changes by then or risk letting mayoral control lapse.

A drag-out fight over mayoral control doesn’t appear likely, given that most of its past opponents are now allies of City Hall. But the intensity of the debate will depend on which state lawmakers win at the ballot box on Tuesday.

“Who controls the Senate will be an important factor,” said Board of Regents Chancellor Merryl Tisch, who supports the renewal of mayoral control.

Current law gives the mayor the power to appoint a schools chancellor, oversee the system’s $20 billion operating budget, and make decisions about how the city will try to lift student achievement across 1,600 district schools. The landmark legislation passed in 2002 after Mayor Michael Bloomberg’s election and amid a bipartisan wave of support for dismantling the city’s 32 local school boards. The law also created a citywide board, now called the Panel for Educational Policy, which votes on policy decisions.

The last time the mayoral control legislation expired, in 2009, lawmakers were unable to settle on revisions before the “sunset” deadline. They ultimately revised the law to limit the mayor’s power in a few relatively minor ways, such as by creating a public review process for when the city decides to close or move a school.

“I think that the opposition to mayoral control had to do, to a large extent, with groups that were battling reforms introduced by Mayor Bloomberg and his chancellor,” said Kathryn Wylde, head of the Partnership for New York City, a coalition of business leaders that was an early advocate of mayoral control.

But that doesn’t mean tackling the school governance law will be a cakewalk for legislators.

The legislative session, which begins in January, will offer opportunities for advocates to air their grievances about how schools in New York City are managed. Last year, de Blasio clashed with Gov. Andrew Cuomo and state senators over education, which led to an erosion of the mayor’s power when it comes to finding space for new and expanding charter schools.

Charter school advocates have spent $4 million supporting Senate candidates who could tip the balance for Republicans, according to Capital New York, and their top legislative priority will be to increase their numbers. State law permits 256 charter schools to open in the city, but only 28 charters remain unclaimed. Advocates are hoping to raise or eliminate that cap next year.

Complicating matters is that support for mayoral control in New York City doesn’t split neatly along partisan lines. In 2009, charter school backers, now de Blasio’s critics, were mayoral control’s most vocal supporters. Senate Democrats, now de Blasio’s allies, for a time stood in the way of a deal to renew mayoral control.

On this issue, some the fiercest critics of de Blasio’s education policy are finding themselves on his side.

“Mayoral control gives the district a fighting chance by wresting governance away from special interests, but it’s up to the mayor in power to lead the way forward for kids,” said StudentsFirstNY’s Jenny Sedlis.

And in a sign of remaining tensions, a number of de Blasio allies want a school structure that would wrest some control from City Hall.

Even some of de Blasio’s own PEP members say they want to see changes. Norm Fruchter, an education policy analyst and mayoral appointee to the PEP, said parents should be given some authority to approve school co-locations or closures that the city is proposing in their district.

Though de Blasio has made efforts to involve parents, “I think where the law is wrong is it eclipses any form of democratic decision-making at the local and neighborhood level,” Fruchter said.

Diane Ravitch, another supporter of de Blasio’s, said she wants to see a model in which the PEP, not the mayor, is the chancellor’s boss and the mayor can only select panel members who have been recommended by another independent body.

“The key issue is who appoints the chancellor and who can fire him or her,” Ravitch said.

As the issue inches into the spotlight, a remaining question is how outspoken de Blasio will be in support of mayoral control. As a city councilman, de Blasio praised the role that community school boards played in elevating the voice of parents before mayoral control. But as a candidate for mayor, he made it clear he didn’t want to see the mayor’s powers diluted and said he would only support tweaks to the law.

De Blasio hasn’t spoken publicly about the issue since taking office, and his office didn’t respond to questions about the city’s legislative priorities for renewing mayoral control.

But when the issue comes to the fore, there are signs that the administration will be ready. A top lobbyist for renewing mayoral control five years ago, Peter Hatch, is now a senior policy advisor to Deputy Mayor Anthony Shorris.

De Blasio will have to grapple with Democratic colleagues in the legislature. Assemblyman David Weprin of Queens is sponsoring a bill to strip the mayor of his power to appoint the schools chancellor and take away its supermajority on the Panel for Educational Policy. (The mayor appoints eight of 13 of the PEP members under the current structure; Weprin’s legislation would cut that number in half and require more appointees to be public-school parents.)

“It’s an institutional thing,” explained Weprin. “I don’t think you can do legislation based on one particular mayor.”