The city has at least a year to spur improvements at its most troubled schools before it could be forced to hand them over to outside groups, under a tentative state budget deal that Mayor Bill de Blasio said Monday would help the city keep control of its struggling schools.

The agreement between state lawmakers and Gov. Andrew Cuomo scales back Cuomo’s initial plan to put any school that has performed poorly for several years under the oversight of outside groups, which would have the authority to override contract rules in order to make major shakeups. Under the deal, school districts would have more time to make changes before those outside “receivers” are brought in, district leaders would select the receivers, and those entities could not sidestep collective bargaining agreements, according to Cuomo administration officials and people familiar with the deal.

“Per this budget agreement, the city will continue to play the primary role in determining the ways to best address those struggling schools,” de Blasio told reporters Monday, emphasizing that the deal will not be final until it is passed by lawmakers and signed by the governor. The deadline for an on-time budget is April 1.

At the same time, the agreement places even more pressure on de Blasio’s $150 million “Renewal” program to turn around the city’s struggling schools. Under the deal, the schools would have at most two years to make acceptable gains. If they do not, the city must yield control to the receivers it appoints, which can be nonprofit groups, turnaround consultants, or other school districts, according to Cuomo’s original proposal. (De Blasio said Monday that he was “very confident” his turnaround program would succeed.)

The agreement follows City Hall’s public campaign in recent weeks to tout the city’s own turnaround program for struggling schools, part of a broader push to get state legislators to make the law giving the mayor control over the city school system permanent before it expires in June. The budget deal does not include an extension of mayoral control, leaving lawmakers to address that later this spring.

De Blasio said he was disappointed to see that decision “postponed,” but added that the deal leaves much authority over the city’s low-performing schools in the hands of his appointed schools chief, Carmen Fariña.

“The tentative agreement makes clear that every step of the way the action is led by the chancellor,” he said. At a separate event Monday, Fariña said the city’s Renewal program “should not be out of synch” with the changes the state wants to see at troubled schools.

Under the deal, 27 schools across the state that have been classified as low-performing for about a decade would have one year to show “demonstrable improvement” before their local school chiefs would have to appoint a receiver to take over, according to the Cuomo administration officials. A number of those schools are located in the city, according to people briefed on the budget talks.

Another 151 bottom-ranked schools would get two years to make gains before receivers are brought in, the officials said. New York City has 91 of those bottom-ranked schools, which the state defines as having been under state watch for the past three years and among the lowest 5 percent of schools in the state based on test scores or having a graduation rate below 60 percent.

If receivers take control of the schools, they will have the power to reshuffle staffers, extend the school day, or make other specific changes, the officials said. In the year or two that districts will have to revamp those schools before the receivers could take over, the district school chiefs will get those same powers. (In recent weeks, some of those superintendents have complained about the idea of receivers getting the authority to make changes that they were never given.)

However, in contrast to Cuomo’s initial proposal, the deal would not allow school chiefs or receivers to bypass collective bargaining agreements in order to make those changes, according to the officials. Instead, the labor unions would be required to negotiate side agreements to their contracts in order to allow the changes.

If the two sides cannot come to an agreement, then the state education department would make a final decision, according to people briefed on the deal.

Some of the details were still unclear Monday, possibly because they were still being negotiated. For example, some people familiar with the deal said that school districts would set their own improvement goals for the schools, which could include higher attendance or lower suspension rates in addition to test score gains. But the administration officials said that the state education commissioner would judge whether the schools had made enough progress to stay under the districts’ control.

There was also talk Monday of a plan to direct $75 million to those 27 longest-struggling schools. But it was unclear whether that money would arrive in time for next school year or not until the following year, when receivers could take over some of the schools.

“Our question is when does that money become available,” said Billy Easton, executive director of the Alliance for Quality Education, a teachers union-aligned advocacy group critical of Cuomo’s education agenda. “There should be no reason that a school or district should have to wait for a receiver in order to get the resources they need to improve.”

The city and state teachers unions have mounted aggressive lobbying and organizing campaigns against Cuomo’s receivership plan and other education policy changes he wanted in exchange for school-funding increases. After the deal was announced, the leaders of both unions claimed at least partial victory.

In an email Sunday night, United Federation of Teachers President Michael Mulgrew told city teachers that “the governor’s Draconian agenda has, in large part, been turned back.” In regards to struggling schools, “Local oversight has been maintained,” and “collective bargaining is preserved,” he said.

Geoff Decker and Stephanie Snyder contributed reporting.