AUGUSTA — The Legislature moved a step closer Tuesday to enacting a controversial measure that would forestall a $40 million cut in state aid to municipalities.

The bill, L.D. 1762, passed the House in a 114-20 preliminary vote last week and additional votes in the House and Senate on Tuesday.

Despite the wide vote margins, the bill has been subject to intense partisan wrangling. Republicans have voiced strong objections to the funding mechanism, which includes taking money from the state’s rainy day fund — money set aside to cover budget shortfalls or other expenses. They say it would damage Maine’s credit rating and make it more costly for the state to borrow money for transportation, economic development and other needs.

Republicans also objected to taking money from a second fund that’s designed to use revenue surpluses to pay for income tax cuts.

On Tuesday, House Republicans introduced a variety of amendments designed to fund municipal revenue sharing with a host of cuts to government programs. Democrats, who have the majority, killed off each amendment after another lengthy floor debate and roll call votes that could play into the upcoming legislative election.

The Senate approved the proposal on a 33-2 vote.

Sen. Gary Plummer, R-Windham, voted with Democrats, but not before noting that he felt forced to do so. He said his vote was a “surrender” to the politics of the bill, which had put lawmakers in the position of supporting the bill or being perceived as opposing aid to municipalities.

Sen. Richard Woodbury, an independent from Yarmouth, and Sen. Patrick Flood, R-Winthrop, voted against the bill. Both lawmakers recently announced that they’re not seeking re-election this year.

Additional votes are required before L.D. 1762 goes to Gov. Paul LePage. LePage has said that he’ll withhold state borrowing projects for transportation and other spending if the bill passes the Legislature. The LePage administration, citing a 2013 analysis by Moody’s Investor Service, said the proposal would lead to a downgrade in the state’s credit rating.

Democrats counter that a downgrade is avoidable because of a provision that automatically backfills the rainy day fund with a revenue surplus, which the state is expected to have at the end of the month. Additionally, Democrats say the bill fulfills the state’s promise to municipalities, which are counting on the funding to avoid painful cuts in services or raising property taxes.

The projected impact, along with increasing pressure from municipalities, is the reason that 30 House Republicans joined Democrats in the House vote last week. Several Republicans supported the bill despite speaking against it during a three-hour floor debate.

The Senate experienced the same mass migration of Republican votes as the House.

Flood, a ranking member of the budget-writing committee, said lawmakers should wait until there’s a new revenue forecast at the end of the month before voting on a bill that taps an undetermined surplus. Flood said there was no reason to rush the proposal, while other Republicans said the bill was a political move by Democrats to portray Republicans as opposing municipal revenue sharing.

Democrats said it was important to push the proposal because cities and towns are planning their budgets for next year now.

Steve Mistler can be contacted at 791-6345 or at:smistler@pressherald.comTwitter: @stevemistler