Having spent the last two and a half weeks running “numbers games,” House and Senate negotiators struck an agreement Monday on how to divvy up more than $1.3 billion in surplus revenue generated by the state’s surtax on household income in excess of about $1 million.

The compromise budget would divide the surplus surtax revenues more evenly than the House had approved but not as close to a 50/50 split as the Senate had backed. The accord includes $716 million for transportation and $593.5 million for education. All six conference committee members signed off on the agreement when they met Monday afternoon to finalize it.

“It really is a compromise. We landed pretty much in the middle,” Senate Ways and Means Chairman Michael Rodrigues of Westport said of the package. “We in the Senate, we focused on whether it’s aid to cities and towns, supplemental Chapter 90, or our RTAs regional equity in transportation, deferred maintenance in our public higher educational institutions, and we’re very happy.”

The negotiated bill could reach Gov. Maura Healey’s desk as soon as Wednesday, when the House and Senate each plan to meet in formal sessions.

Of the $716 million for transportation, $535 million or just shy of 75% would go towards improvements and transportation infrastructure upgrades across the MBTA system that mostly serves Greater Boston. That includes $300 million to replenish the T’s budget reserve account, $175 million in workforce and safety funding to pay for implementation of Federal Transit Administration recommendations, $40 million for physical infrastructure upgrades, and $20 million for the T’s low-income fare relief program.

“I feel very comfortable and happy with the final result, particularly that we kind of balance the scales back towards transportation,” House Ways and Means Chairman Aaron Michlewitz of Boston said.

Whether it was for money for the T or another spending item that needed to be resolved, Michlewitz said that “whether they went higher or we went higher, you know, we got pretty much somewhat in the middle of where we both were.”

“A lot of it was more numbers games,” he said.

The chasm in surtax surplus spending was one half of a broader disagreement between the House and Senate on the scope of state aid to the MBTA. Combining the surtax surplus bill and the annual state budget that remains in conference negotiations (among the same group of six lawmakers who hashed out the surtax agreement), the House would provide the T with about $1.4 billion while the Senate versions would give the agency roughly $820 million total. Both would be in addition to the T’s dedicated portion of the state sales tax.

Last week, the MBTA Board approved a $3.24 billion fiscal 2026 budget that increases total expenses by $222 million or 7%. Officials said the agency’s budget deficit is projected at $168 million in the fiscal 2026 budget, compared to $307 million in the fiscal 2025 budget. T officials said in a presentation to the board that the budget assumes a $361 million or 13% increase in revenue “due to proposed investments made in Governors H1 budget and FY25 Supplemental Budget, and increased Fare Revenue.” It also assumes a $40 million or 3% decline in state sales tax revenue to the T due to “[d]ecreasing consumer sentiment and motor vehicle sales.”

Michlewitz, whose branch had approved about $793 million for the MBTA in its version of the surtax spending bill, said he thinks the compromise bill’s $535 million support for the T “is sufficient for now, but certainly we’ll continue this conversation.”

“Sounds like, from what the numbers have been coming through for FY 25, that we’re going to have another significant surplus discussion at some point next year ... and I think we’ll continue to have that conversation throughout the next year,” he said, alluding to last week’s news that the surtax may generate $3 billion in revenue this year. “But I think for now, this is a significant number for us to be moving forward, and I think we’re very happy with it.”

The bill also includes $103 million in transportation-related aid to cities and towns. Among that sum is $80 million for supplemental Chapter 90 aid ($40 million of which is earmarked to help small and rural communities), $16.4 million to address problems with municipally owned small bridges and culverts, and $7 million for the improvement and maintenance of unpaved roads.

There is also $73 million in the bill targeted for regional transit initiatives. That figure includes $25 million for capital improvements at regional transit authorities, $25 million for workforce recruitment and retention efforts at RTAs, $13 million for ferry infrastructure improvements, and $10 million for “on-demand micro-transit shuttles and Last Mile grants fostering an innovative multimodal transit system.”

Another $5 million would be funneled into “transportation improvements” surrounding the 2026 World Cup, with seven matches planned at Gillette Stadium in Foxborough. Rodrigues previously called the money a “down payment” for “traffic safety concerns” around the tournament games that start in about one year in Foxborough.

The bill’s $593.5 million for education includes $248 million for special education costs including circuit breaker reimbursements to local school district, $100 million for career technical education capital grants, $45 million for workforce, affordability and quality improvement initiatives in the early education sector, $25 million for “high dosage tutoring” to support literacy among students in grades K-3, $10 million to reduce the waitlist for English language learners, and $10 million to support a Holocaust museum in Boston.

There’s also $115 million for public higher education deferred maintenance costs, including $10 million to modernize labs at community colleges.

The conference committee bill includes a total of $1.39 billion, with almost all of it coming from fiscal 2023 or fiscal 2024 surtax surpluses and much smaller portions of one-time spending stemming from the Student Opportunity Act Investment Fund and the Transitional Escrow Fund, officials said.

The final contours of the surtax supplemental budget will inform ongoing talks around the fiscal 2026 state budget, which is due by the end of the month. The House passed a nearly $61.5 billion budget in April and the Senate passed its own spending plan of just more than $61.4 billion in May. The difference in spending between the two budgets is $70.3 million or about 0.11%, the Mass. Taxpayers Foundation said.

Aside from spending though, budget negotiators have a sizeable list of issues to deliberate: the use of one-time revenues to support spending, how much money to provide the MBTA as well as other transportation and education initiatives funded by the income surtax, whether to transfer hundreds of millions of dollars to the health safety net program, whether the state should give up some control over alcohol licenses to cities and towns, the specifics of regulating broker’s fees, whether to allow state health care regulators to cap prices for some medications, whether to pause admissions reforms at vocational and technical schools, and more.