WHEN BOSTON MAYOR Mayor Marty Walsh testified in late March on behalf of a bill to revamp the state’s 26-year-old education funding formula, he called it “a solution that will finally take politics out of the conversation.”

But as underscored by plans for a big State House rally on Thursday to push for more state aid to schools, politics is always part of the education funding conversation. That is particularly true of the provision in the funding bill that brought Walsh to Beacon Hill.

The legislation, filed by Sen. Sonia Chang-Diaz of Boston and state Reps. Mary Keefe of Worcester and Aaron Vega of Holyoke, would dramatically increase funding for districts educating low-income students. But it’s a provision in the bill that could steer as much as $100 million a year to Boston because of the large number of charter school students in the city that has turned Walsh from a sideline observer of last year’s effort to update the funding formula into an ardent advocate of the Promise Act, one of several bills proposing major updates to the school funding formula this session.

The provision would guarantee that communities receive a set allotment of state aid for their district schools after allowing for state payments that go to charter schools in that community. Most of Boston’s state aid now goes to charter schools, and without the change proposed in the bill city officials say within two years all state funding could end up being diverted to Boston’s independently run, but publicly funded, charter schools.

Walsh called the provision key to maintaining the principle that education funding is a “partnership between the Commmonwealth and all the communities,” saying failure to approve the provision would “spell the end” that pact when it comes to the state’s largest district.

But critics, including state education secretary Jim Peyser, say that section of the bill would essentially have the state pay twice for the same students, and do so with money that could otherwise go to communities that, unlike Boston, are struggling to maintain minimum funding levels for their schools.

Walsh’s framing of the fragile condition of the city-state partnership rests on a particular way of viewing the flow of funding for schools in the state.

Local districts fund schools with a combination of state aid and local revenue raised by communities through property taxes and other assessments. The ratio of local to state dollars is determined by a formula that takes into account the ability of communities to support their schools.

Under that formula, Boston qualifies for the minimum amount of aid from the state because of a property tax base that has been growing steadily under the city’s unprecedented development boom. At the same time, Boston is home to the largest number of charter school students of any community in the state – about 10,000 pupils. Charter schools receive the same level of per pupil spending as district schools in the communities where they operate. They get that funding directly from the state, which deducts charter school tuition payments from the aid sent to the district school system.

Because of those dynamics, for the current school year, all but $40 million of the roughly $242 million in state aid earmarked for Boston is going to charter schools in the city.

The Promise Act would guarantee that communities receive their allotted share of state aid for schools after accounting for charter payments.

“If the Commonwealth is going to invest additional funding in education, it needs to ensure that the additional funding is getting back to districts that educate the highest numbers of low-income, English language learners and special education students like Boston,” said Justin Sterritt, Boston’s budget director.

While Boston officials say the Promise Act would preserve the state-local partnership in funding schools, Peyser and others say that partnership is intact without the extra payments related to charter students. The argument for the added funding, they say, ignores the fact that state aid is paying to educate charter students who don’t add to a district’s school enrollment and costs and whose education those communities bear responsibility to help pay for.

“The money is fungible,” said Peyser. From an “accounting standpoint,” he said, the state pays all charter school costs out of communities’ state aid allotment, rather than sending all aid to cities and towns and having them use that money to fund to both district and charter schools.

“The reality is,” Peyser said, “we’re paying for 25 percent of [the cost of] all Boston students,” both district and charter, referring the percentage of the so-called foundation budget in Boston that the state currently contributes.

Rep. Alice Peisch, the House co-chair of the Legislature’s Education Committee, expressed skepticism about the provision at the hearing on the education funding bills. “My concern is that any dollar that goes to a city other than a Gateway City is money that doesn’t get to the Gateway Cities,” she said, a reference to the string of former industrial cities across the state that struggle to fund their schools at the basic level, which are the primary focus of the Beacon Hill debate.

Boston, with its great property wealth, is able to dip into its own coffers to spend well above the state required minimum, with the city’s schools funded in 2017 at just over $20,200 per pupil. Many Gateway Cities, in contrast, are only able to fund schools at or near the state required foundation budget level. Per pupil spending in 2017 for Worcester’s schools, for example, was $14,125, while the figure for New Bedford was $13,978.

Peisch pointed out at the hearing that the charter payment provision would steer money to several communities like Boston that “may have poor students, but they are not poor cities.” Cambridge, for example, which is home to about 500 charter school students, would get added state funding under the provision, even though, thanks to its rich tax base, it spends twice as much on schools as Worcester – $28,600 per pupil in 2017.

The foundation budget for schools has been the focus of growing criticism from education leaders who say the formula used to calculate how much a district needs to operate – and how much aid it will therefore receive from the state – has not kept pace with actual costs and has been out of kilter for years.

A 2015 state commission concluded that schools need an additional $1 billion to $2 billion a year in order to put the funding formula in sync with increased costs of employee health care coverage, special education programs, and educating English language learners and low-income students.

Chang-Diaz said the Promise Act would deliver $1 billion or more in new state aid to schools. Gov. Charlie Baker has filed a bill to revamp the school aid formula that increases state funding by roughly half that amount.

Exactly what the charter payment provision of the Promise Act would cost is not clear.

Boston officials say it could mean $200 to $300 million a year more for districts, with Boston in line to receive about $100 million. Peyser’s office pegs the likely cost of the measure at $150 million, with Boston receiving about half of it.

Factoring in the debate over the funding bills has been the state’s failure in recent years to fully fund an account meant to provide communities with temporary transitional payments to cushion the impact on district systems of students enrolling in charter schools. The 2019 state budget appropriates $90 million, or a little more than half, of the $162 million districts should receive under the reimbursement formula.

“If the formula was honored, that would change the conversation, for sure,” said Vega, the Holyoke rep who is a cosponsor of the Promise Act.

Legislative leaders and Baker have vowed to reach an agreement on revamping the education funding formula this year, after a similar effort sputtered out last session. In the give and take that negotiations always entail it’s not clear where the charter provision that Boston officials are strongly pushing will end up.

Baker’s bill would, after full implementation, steer an additional $16 million to Boston to make up for some the impact of its charter school enrollment.

While the Promise Act has drawn broad support, including from advocates who will be rallying at the State House on Thursday, it’s the bill’s call to rework the foundation funding formula and dramatically increase state aid to districts with low-income students, not the added payments related to charter students, that most supporters seem focused on.

Worcester, one of the cities Peisch says is in desperate need of more funding, would see an increase of about $100 million in annual state aid under the bill, once fully phased in. But only about $4.5 million of that would come from the charter payment provision, according to the school department’s chief financial officer, Brian Allen. “Our focus currently is primarily on the economically disadvantaged funding,” Allen said.

Tracy Novick, a former Worcester school committee member who is running to reclaim a seat on the board this fall, said the overarching issue in the funding debate is how much the state will boost funding for financially struggling districts with lots of low-income students.

For Worcester, “the real dog in this fight is the low-income increment,” she said. As for the charter payment provision, she said, “My sense is this isn’t the hill that people are going to die on of all the ways we can decide things aren’t fair.”