State lawmakers have agreed to a deal that would extend mayoral control of city schools by just one year and would allow more charter schools to open in New York City.

The one-year extension of mayoral control is a significant blow to Mayor Bill de Blasio, who had requested a permanent, and then a three-year, extension of the law, arguing that it would provide needed stability as he continued his efforts to improve the city’s schools.

The one-year extension is the “best thing to do at this point,” Gov. Andrew Cuomo said as he announced the framework of the deal Tuesday alongside Assembly Speaker Carl Heastie and Senate Majority Leader John Flanagan.

The deal comes one week before the mayoral control legislation would have expired, allowing the city to avoid the logistical headaches that would have followed if the legislation had been allowed to lapse, as it was in 2009. But the package of education changes marks another chapter in what has been a series of sobering experiences for de Blasio negotiating with Cuomo and the state legislature.

Last year, de Blasio won funding for his top education initiatives, including pre-kindergarten expansion, but was then hit with a costly new law requiring the city to provide space or rent help for charter schools after he signaled interest in restricting their access to public school buildings. This year, the legislature also passed a new teacher-evaluation law that both de Blasio and Chancellor Carmen Fariña have criticized, and Cuomo repeatedly clashed with the mayor over rent regulations and other issues.

The deal would also increase the number of additional charter schools that could open in New York City from 25 to 50. Of the 25 new charters, 22 are coming from schools that were authorized but never opened or that have closed, which under current law still count against the cap. New York City, where there is more demand for charter schools than the rest of the state, will also have three charters moved from the statewide pool of charters to its own.

The deal would also remove the specific numbers of charters assigned to both of the state’s authorizers. That would allow more city charter school applicants to apply through the State University of New York — a big deal for the larger charter school networks, whose preferred authorizer is SUNY. Before the change, just one more charter school authorized by SUNY could have opened in New York City, but the change would mean as many as 50 now could.

The state leaders also announced an infusion of about $250 million for nonpublic schools, though the much-debated education tax credit did not make it into the final deal. Cuomo said that funding — $100 million more than the education tax credit would have funneled to nonpublic schools — was necessary to help private and parochial schools struggling to stay afloat.

“If we allow those schools to continue to close and those students start moving over to the public school system, you will place an impossible burden on the public school system,” he said.

The deal, which must still be approved by the State Senate and Assembly, pushes the expiration of mayoral control to June 30, 2016. That means de Blasio is likely to spent part of the next year continuing to lobby for a policy he has spent months trying to portray as a settled, nonpartisan matter, lining up support from less-traditional allies like former Mayor Rudy Giuliani and coalitions of business leaders.

City teachers union leader Michael Mulgrew, business leaders, and charter-school advocates all found things to praise in the deal, which included concessions for all of those groups.

The unions touted the elimination of a “gag order” that had prohibited teachers from speaking about the state standardized English and math tests. State education officials had prohibited teachers and principals from discussing the tests’ contents because they sometimes had to use the same questions from one year to the next. Another part of the agreement, union officials said, requires that State Education Department release more test questions. (The state released about half of the test questions from the 2014 exams.)

“We started this session with the Governor attacking teachers and public education,” Mulgrew said in a statement. “We have ended up with no education tax credit and no raise in the charter cap, with only four charters reassigned to the five boroughs.”

“The business community is relieved that the end-of-session compromise reflects an undiluted extension of mayoral control of the New York City schools,” said Kathryn Wylde, CEO of the Partnership for New York City, a coalition of business leaders that advocated for a permanent extension of mayoral control.