House and Senate leaders said Tuesday night that they had struck a deal to spend $4 billion in American Rescue Plan Act and state tax surplus funds, concluding a two-week negotiation that spilled over into the Legislature's end-of-year recess.

House Ways and Means Chair Aaron Michlewitz and Senate Ways and Means Chair Michael Rodrigues, the two lead negotiators for their respective branches, issued a joint statement announcing the agreement, which they said still needed to be finalized.

The two top Democrats did not give a timetable for when the Legislature might try to pass the compromise bill, which would have to be taken up during an informal session where rules prohibit a roll call vote and a single lawmaker could block its passage.

Earlier in the day, House Speaker Ron Mariano said he did not anticipate any trouble in passing a compromise bill during informal sessions in December if a deal could be struck, saying that his preference would be not to wait until January.

"This $4 billion spending agreement is reflective of an extensive public hearing process we engaged in earlier this year and encompasses a wide array of one-time investments to put these funds to work for the residents and communities of our Commonwealth, including sectors hardest hit by the global pandemic - such as housing, economic recovery, public health, mental health, climate preparedness, education and workforce - with a focus on supporting communities disproportionately impacted by COVID-19 and addressing economic and racial inequality," Michlewitz and Rodrigues said in the statement.

Both branches had unanimously passed $3.82 billion spending plans that overlapped considerably in where the money would be spent, but differed in how much to put toward each priority and had some unique initiatives. The House and Senate also each added just over 400 earmarks to their respective bills, funding everything from MBTA station upgrades and town gazebos to local tourism websites and theater improvements.

Both bills also contained $500 million for the state's unemployment insurance trust fund, and $500 million for bonus checks of up to $2,000 for low-income essential workers who stayed on the job throughout the COVID-19 pandemic.

Despite the commonalities, House and Senate leaders did not begin formal conference committee talks until Nov. 15 - just three days before the start of a seven-week recess - and were unable to reach a quick compromise. Gov. Charlie Baker, who filed a proposal back in May to spend some of the state's ARPA funding, has been among those vocal in their criticism of the Legislature's inability to get a bill done before the break.

The statement did not lay out any specifics of the agreement. Both branches meet next on Thursday.

"Once the agreement is finalized, the Conference Report will be filed. We look forward to discussing the details of the agreement publicly then," the chairmen said.