AUGUSTA — A borrowing package that was scaled down to $57.8 million after a weekend of intense negotiating won final legislative approval Monday in one of the Legislature’s last acts before it adjourned its two-year session.

A 30-5 Senate vote followed a 102-44 tally in the House, easily surpassing two-thirds majorities needed to send the bond issue to voters in June.

Minutes before lawmakers adjourned, Gov. John Baldacci spoke to the House and Senate, thanking each for accomplishing much despite difficult economic times.

“You’ve made a real difference in the lives of countless people,” said Baldacci, who leaves office after this year.

A few local legislators were won over by the compromised package, including state Rep. Michael Beaulieu, R-Auburn, and state Sens. Walter Gooley, R-Farmington, and David Hastings, R-Fryeburg. All three had voted against the initial $85 million bonding proposal last week, but voted for the smaller version on Monday.

While the bond package reduces proposed spending for most items covered, it still retains money to buy and preserve a rail line that’s considered a lifeline to Aroostook County industries as well as money for highways, the Ocean Gateway pier in Portland, and small harbor improvements.

An earlier version of the bond package totaling $85 million was stopped in the Senate last Wednesday when Republicans held back their votes, leading to behind-the-scenes negotiations.

“What we tried to do is find every little penny we could find to make this thing work,” said Sen. Bill Diamond, D-Windham, who co-chairs the Appropriations Committee.

After a legislative timeout, lawmakers reconvened Monday to find construction workers lobbying for the bonds. A lighted sign urging a yes vote was in place, construction workers wearing shiny yellow safety vests filled the hallways, and dozens of work trucks were parked on nearby streets.

The scaled-down proposal that was hashed out over the weekend called for a $57.8 million bond package, but lawmakers actually limited new borrowing to $44.3 million because they also agreed to cut $13.5 million out of a separate bond package already scheduled to go before voters in June.

Opponents, who never quibbled with the merits of projects to be funded, continued to question whether the state should take on more debt as it recovers from historically difficult fiscal circumstances. During a brief House debate, Rep. Robert Nutting, R-Oakland, said the new bond package could have waited until next year.

The compromise bond package reduces by $10 million the nearly $35 million that had been earmarked for highways, and borrows only $7 million instead of $17 million for the purchase and preservation of 233 miles of Montreal, Maine & Atlantic Railway track in Aroostook County.

Another $10 million of money for the railroad, which is seen as a crucial shipping corridor for northern Maine industries, would be comprised of $7 million from the budget stabilization fund and $3 million from the companies that ship by rail.

The new package reduces funding for western Maine’s Mountain Division rail line by $1 million to $4 million, but retains all $5 million that had been earmarked for the Lewiston-Auburn rail line. Portland’s deep-water pier would get $6.5 million instead of the $7 million previously envisioned.