AFTER STARING into the abyss of a transportation system on the verge of bankruptcy, Virginia lawmakers may be coming to their senses. The state Senate, which for a time threatened to kill all relevant legislation, now appears likely to adopt a drastically different (and more rational) solution than the one embraced by Gov. Robert F. McDonnell (R) and the House of Delegates.

That sets the stage for hard bargaining between the two chambers. But at least it sustains hopes that after a quarter-century of neglect, Virginia will at last devise a plan to pay for the highways, rails and bridges that it uses.

Between the two chambers’ plans, the one emerging in the Senate is the more conventional — and the more sensible. It raises the gas tax at the pump and the wholesale level — in effect, a fee on those who use the roads — to generate almost $1 billion annually by 2018. It would index the gas tax to inflation, which should have happened decades ago.

Virginia hasn’t raised its gas tax since 1987, leaving it with one of the lowest levies in the nation and, unsurprisingly, a rapidly dwindling source of transportation dollars. Under current projections, state funding for new road projects will run dry four years from now.

The governor’s plan, which emerged mostly intact from the House, uses less logical means to raise far less money. It would scrap the gas tax, something virtually no other state has done, replacing it with a 16 percent increase in the sales tax on all other goods. It would cannibalize general-fund revenue — used for schools, public safety, health programs and other services — to pay for road construction. Realistically, the governor’s plan would yield less — maybe $600 million by 2018.

But the two proposals are not diametrically opposed. Both would raise vehicle registration fees. The Senate would also increase the sales tax, though not as sharply as Mr. McDonnell wants.

The particulars of the competing approaches are important but not nearly as critical as the bottom line: finding a compromise that yields something close to $1 billion annually. For more than a decade, lawmakers have feuded. Now it’s time for some old-time horse-trading and, most important, a deal.