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.”