Legislation that will raise gas and diesel taxes May 1 has passed the Legislature and is on its way to the governor for his signature.

The House on Wednesday quickly approved a compromise transportation bill that includes the tax hike.

Rep. Patrick Brennan, R-Chittenden, chairman of the House Transportation Committee, said the bill strikes a middle ground between the House and Senate versions.

“With a little back and forth I think we’ve come to a place where we can actually make this tax package a little more palatable, if that’s possible,” Brennan said.

Under the legislation, gas taxes would rise 5.9 cents in May, while diesel taxes will increase by 2 cents in July.

A year later, the tax on diesel goes up another penny, for a total increase of 3 cents.

The goal behind raising the fuel taxes was to match $56 million in federal funds targeted for road and bridge repair.

Gov. Peter Shumlin and legislative leaders said without the tax, Vermont would not be able to spend some of the federal money.

The House had originally wanted slightly higher tax increases. But Brennan said negotiators agreed to use a one-time appropriation as well as money generated by the diesel tax to make up the difference.

The final vote was 107-36, with many Republicans voting against the increase. Rep. Brian Savage, R-Swanton, said many of his constituents opposed the tax hike.

“Working Vermonters will again be the brunt of this choice to raise the gas and diesel taxes,” Savage said. “Our small businesses, along the New Hampshire and Massachusetts border are already at significant disadvantage and this will make it worse.”

The House vote was followed by approval in the Senate. Leaders in both chambers wanted swift approval of the measure so it could become law in time to generate revenue in May.