Gov. Gavin Newsom brokered an agreement Wednesday on a high-profile charter-school regulation proposal at the center of this year’s contentious battle between teachers unions and charter advocates, removing a key hurdle for its passage this session.

The compromise on Assembly Bill 1505 comes after months of lobbying by the state’s two most influential education interest groups and several impassioned hearings over sweeping proposed changes to how the publicly funded, independently managed schools operate in California.

Initiated in the early 1990s as a way to bring innovation into California’s K-12 school system, charter schools have sharply grown over the years, primarily in the state’s urban school systems, and have become a flashpoint for unions, who contend they draw enrollment away from traditional public schools, depriving them of critical funding and resources.

In a joint statement Wednesday afternoon, Newsom and Senate and Assembly leaders characterized the deal on AB 1505 as one that “significantly reforms the Charter Schools Act to address long-standing challenges for both school districts and charter schools.”

“This agreement focuses on the needs of our students,” the statement from the Governor’s Office read. “It increases accountability for all charter schools, allows high-quality charter schools to thrive, and ensures that the fiscal and community impacts of charter schools on school districts are carefully considered.”

Under the latest iteration of AB 1505, which lawmakers are expected to vote on in the two weeks remaining before the end of the legislative session, local school boards would have more discretion over approving new charter schools, including the ability to factor in a new charter’s impact on a district’s finances — a criterion that districts were not allowed to consider for prior charters.

All charter school teachers also would be required to hold some sort of state credential along with a background check, though uncredentialed charter teachers leading “non-core” classes would have five years to meet that requirement.

The state would also impose a two-year moratorium on non-classroom based and online charter schools under the proposal. But a pathway toward appeals to county and state boards for charters denied by local school boards would remain in place under the proposal.

Unions representing teachers and classified school employees celebrated the agreement, touting it as “significant progress on behalf of our students.” The California Teachers Association, which backed Newsom during the election, spent $4.3 million this year lobbying for more restrictions to charter schools.

“All along, our goals have included ensuring locally-elected school board members have the discretion to make decisions to meet the needs of local students … and holding all taxpayer-funded public schools to the same high standards,” the CTA and a coalition of unions said in a joint statement.

The California Charter Schools Association removed its opposition — formally shifting to a “neutral” position — on AB 1505 after it said it secured “significant protections” for charter schools, including some preservation of appeals to counties and the state, as well as granting high-performing charters a fast track toward renewal.

“For 25 years, California’s charter public school movement has relentlessly run towards the greatest challenges in public education,” Myrna Castrejón, president and CEO of the state’s charter association said in a statement.

“Far too many of our most vulnerable students have been underserved by our current public school system, which is exactly why we’ve engaged in thoughtful conversations and shown a willingness to compromise on this important legislation.”

News of the agreement marked a striking departure from previous sessions in which teachers unions and charter advocates bitterly fought the opposing sides’ proposals to a legislative stalemate.

But Newsom, who won office amid heavy opposition from deep-pocketed charter supporters, signified soon after he took office in January that he planned to play an active role in mediating California’s charter school debate.

One of the first bills Newsom signed this year, Senate Bill 126, requires charters to adhere to the same public-records and open-meeting laws as traditional district schools — a proposal that had passed previously but was vetoed by Gov. Jerry Brown. Legislators fast-tracked that bill partly in response to the massive Los Angeles teachers’ strike in January that amplified the debate over charter school restrictions.

“The goal over the next few months is to work to address a number of these vexing issues that frankly need to be addressed. It’s long overdue to have these conversations,” Newsom told reporters in March after signing SB 126.

The original version of AB 1505 called for granting local school districts sole power over authorizing charter schools in California, granting wide latitude to school boards over charter approvals and removing appeals to the county and state boards altogether.

The bill was introduced as the centerpiece of a package of charter restriction bills by Democratic legislators, and immediately set off an intense public debate. Charter advocates, including the state charter association, decried the original proposal as “poisonous” and an existential threat to charters in California. Teachers unions and supporters of the legislation said the accountability proposals were “common-sense” reforms that were long overdue.

AB 1505 gradually has been amended as it has cleared each successive legislative hurdle, but it became clear it would become the vehicle for a consensus revision after it cleared the Assembly in a narrow and dramatic floor vote. Another charter regulation bill, AB 1507, that would prohibit school districts from authorizing charters outside of their geographic boundaries remains active, as well.

Democratic Assemblyman Patrick O’Donnell, chair of the Assembly’s education panel and author of AB 1505, acknowledged after that vote that it would take further compromises to advance the bill to the governor’s desk.

In a statement Wednesday evening, O’Donnell said the agreement “represents a step in the right direction to reform our state’s outdated charter school laws that have been in place since 1992.”

“This bill is good for kids and for California taxpayers but there is more work to be done to ensure bad actors are held accountable.”