CONCORD, N.H. — As a compromise to last year’s differences over highway funding, New Hampshire’s Senate voted Thursday to temporarily raise the tax on gas and diesel 4 cents in a deal to finish the expansion of Interstate 93.

The Senate voted 15-9 to send the tax-hike bill to the House. The measure would provide more money over the next two years for highway improvements, then take some of the tax proceeds to pay off $200 million in borrowing toward completion of the I-93 project.

Once the debt is paid off, the tax hike would expire. The House passed a 10-year highway plan Tuesday that outlines a way to help pay for the I-93 project and proposes borrowing money to replace the Sarah Mildred Long Bridge between Portsmouth and Kittery, Maine. The bill approved by the Senate would also eliminate the Exit 12 ramp toll booths in Merrimack.

Senate Transportation Chairman Jim Rausch, the bill’s sponsor, had taken it upon himself to push for raising money for road improvements after the Senate soundly defeated a House bill to phase in a 12-cent increase in the tax last year. The Senate took that action after the House rejected a Senate casino gambling bill that earmarked some of the state’s profits to highway improvements.

“I ran into a pot hole, blew out a tire and wasn’t sure how we’d proceed,” Rausch said of his effort to find a compromise.

If approved by the House and signed into law, the state’s 18-cent tax would rise about 4 cents per gallon in July. The tax has not been increased since 1991 and is the lowest in New England. The increase is projected to raise $32 million annually.

Gov. Maggie Hassan has said if a consensus is reached on a tax hike, she will sign the legislation.

The New Hampshire Motor Transport Association opposes the increase, saying it would hurt the trucking industry.