A member of the House Chamber staff secures an entrance to the floor while legislators cast a vote during a session Wednesday at the Augusta Civic Center. Credit: Robert F. Bukaty / AP

AUGUSTA, Maine — The Maine Legislature passed a short-term budget early Friday morning reining in pandemic spending and passing along tax cuts on federal aid after Democrats and Republicans solved a stalemate by putting millions of dollars into a reserve fund.

The deal came after a fraught day at the Augusta Civic Center. House Republicans twice voted down an earlier version of the supplemental budget in a push for business tax cuts above and beyond others that majority Democrats had relented on in the past week.

Republicans secured significant wins on tax conformity, pushing Gov. Janet Mills and Democrats to forgive federal taxes on Paycheck Protection Program loans to businesses. But Democrats refused a tax break on foreign-derived income, a final but obscure sticking point for Republicans that would only help perhaps 10 Maine businesses at a cost of $8.4 million.

Instead, the parties agreed to put nearly that much in the state’s rainy day fund and order a study on the foreign income issue. It passed the Senate in a unanimous vote and the House 139-1 — Rep. Chris Johansen, R-Monticello, being the sole vote against — winning the necessary two-thirds votes in both chambers. Mills is expected to sign the bill.

Lawmakers seemed exhausted after nearly two days of negotiating but in a more agreeable mood Friday morning after negotiating for two days. House Minority Leader Kathleen Dillingham, R-Oxford, thanked Maine House Speaker Ryan Fecteau, D-Biddeford, for “continually keeping the lines of communications open” and members for sticking with the budget until the early hours. House Majority Leader Michelle Dunphy, D-Old Town, called the deal a “victory” for bipartisanship.

“The compromise we reached tonight is the result of weeks of hard work from my caucus and the caucus across the aisle,” she said.

The Legislature narrowly averted leaving without a deal ahead of a Monday tax deadline for businesses, endangering bipartisan agreements on loan tax forgiveness and exempting the first $10,200 in enhanced federal unemployment benefits for Mainers. Republicans said after the vote that they want to expand the latter cut in the two-year budget due this spring.

The $258 million package featuring both pandemic cost-cutting and spending was largely held up by a debate between Democrats and Republicans over how much Maine should adhere to federal tax law and a Republican demand that the Legislature approve Mills’ decisions on spending federal virus aid with two-thirds majorities.

They were roughly $32 million apart as the Legislature met on Wednesday and Thursday to debate and negotiate over the aid. The pandemic loan tax cut amounts to a cost of $100 million, while the one for Mainers who have been unemployed would cost the state $47 million.

Both sides dug in throughout Thursday. A lengthy ream of Republican amendments was summarily voted down by Democrats in the House of Representatives on Thursday morning. Republicans responded by shutting down the budget in an evening vote.

That frustrated Democrats, who passed a two-thirds budget in the Senate late Wednesday after agreeing to a measure from Sen. Brad Farrin, R-Norridgewock, securing $113,000 in veterans services funding that Mills was trying to cut. On Thursday evening before the deal emerged, the governor issued a statement calling the budget’s initial failure a “loss for Maine,” saying both sides made concessions.

Lawmakers faced time pressure, as they had only reserved the city-owned civic center — which has hosted full sessions of the Legislature because of social distancing protocols — through Thursday. MaineGeneral Health was set to reopen its COVID-19 vaccine clinic there on Friday.

The difficult negotiations on the supplemental budget could portend a difficult road for Mills’ two-year, $8.4 billion budget with another $1 billion on the way from the federal government after President Joe Biden signed a stimulus bill into law on Thursday. Lawmakers must pass that budget by spring to avert a state government shutdown.