LAST MONTH Virginia lawmakers enacted the most important state transportation-funding bill in 27 years. Since then irate conservatives have been pounding on Gov. Robert F. McDonnell, a Republican who generally supports the measure, to water it down by amending it. Opponents have taken particular aim at a provision that would raise as much as $500 million annually for road and rail projects in Northern Virginia and Hampton Roads, the state’s most congested regions, on top of $880 million in new statewide funding by 2018.

Virginia law allows governors to rewrite legislation after passage, then send it back to the legislature for a new vote. But Mr. McDonnell, who has put problem-solving ahead of ideology on transportation, should stick to his guns and leave the bill substantially intact, for two reasons.

First, there is a real risk that a major rewrite of the bill would shatter the fragile bipartisan coalition that backed it in the General Assembly. Stripping the legislation of the extra funds for Northern Virginia and Hampton Roads would likely prompt many, if not most, lawmakers from those regions to withdraw their support. Having pushed hard to fix a transportation funding mess that was a quarter-century in the making, Mr. McDonnell is better off with the legislation as passed than with nothing.

Second, the money is desperately needed. For more than a decade, Virginia has tried repeatedly to find new streams of money for roads, only to fail spectacularly year after year.

In 2002, a coalition of anti-growth activists and anti-tax conservatives killed a ballot measure in Northern Virginia that would have yielded millions for transportation. In 2007 the state’s Supreme Court struck down legislation that would have generated major funding. Virtually every other year for the past decade, efforts in Richmond to replenish the state’s rapidly draining transportation fund hit a brick wall.

Mr. McDonnell’s original proposal on transportation funding this year lacked a regional component, and some critics of the bill have suggested that it may not pass state constitutional muster. Others have raised different objections to the bill, including the fact that it shifts some of the burden of transportation funding away from the gas tax, paid by road users, and onto general shoppers by means of a sales tax increase. Some liberals hate that the legislation sticks owners of alternative-fuel vehicles with an annual fee of $100 (though that would account for just 2 percent of the bill’s new revenue).

It’s no surprise that a bill of this magnitude is under attack from all sides. But warts and all, the transportation bill is the most important piece of legislation enacted during Mr. McDonnell’s term as governor. By signing it, he will nail down one of the most substantial achievements by a Virginia governor in years.