The governor was being sarcastic, and the squabble over mayoral control had indeed cast a pall over the end of the regularly scheduled legislative session, which ended last week. At the time, Republican and Democratic lawmakers were deadlocked over whether Mr. de Blasio’s control should be linked to an increase in the number of charter schools. Republicans in the Senate wanted more of them; Democrats in the Assembly did not.

The dispute had imperiled the mayoral-control policy, which dates to 2002 and the administration of Mayor Michael R. Bloomberg, who hailed it as a profound improvement over the old system, under which a Board of Education was the ultimate authority.

But mayoral control has not been without political controversy, particularly during Mr. de Blasio’s time in office; in each of the past two years, the mayor had to accept one-year extensions, as Senate Republicans were stingy with a man whom many in their party disdain, particularly after his unsuccessful effort to help deliver control of the Senate to Democrats in 2014.

This year, Carl E. Heastie, the Assembly speaker, had staked considerable political clout on breaking the one-year cycle, tactically linking the extension of mayoral control of the schools to the renewal of various local taxes that raise much-needed revenue, including in upstate areas where Republicans draw much of their political power.

In the end, Mr. Heastie, a Bronx Democrat, prevailed, securing the two-year extension without approving additional charter schools and earning praise from Mr. de Blasio, who gave the Legislature and governor “great credit for protecting the dramatic progress” in the city’s schools. But charter school advocates, who are ample financial backers of Mr. Cuomo and Senate Republicans, may not have been totally shut out.