WHY CAN VIRGINIA, a state evenly divided between the parties, enact a landmark transportation funding deal while Maryland, a one-party state, remains paralyzed? In a word: leadership.

Two years ago, Maryland Gov. Martin O’Malley (D) appointed a commission to find a fix for a transportation funding system heading toward insolvency. The commission recommended taxes and fees that would yield $870 million in annual revenue — an amount regarded as a bare minimum to maintain existing infrastructure and to build new roads and rail projects.

Its report was presented to Mr. O’Malley and lawmakers in Annapolis — and that was basically that. While the governor offered a transportation proposal last year, he dropped it in the face of resistance from legislators allergic to gasoline-tax increases.

This year, Mr. O’Malley again acknowledged that the state is running out of money for projects. But with the legislative session more than halfway finished, he has proposed nothing.

Meanwhile, Virginia, with a major push from Gov. Robert F. McDonnell, a formerly anti-tax Republican, has managed to adopt a muscular transportation deal whose dimensions — $880 million in annual funding — are almost exactly what was urged for Maryland. The governor pressed ahead despite unyielding opposition from half the lawmakers in his own party. That’s leadership.

Both Mr. McDonnell and Mr. O’Malley are thought to harbor presidential ambitions. But on this core issue of state government, only Virginia’s governor has been a workhorse.

Mr. O’Malley has energetically pursued issues that appeal to Democratic constituencies — same-sex marriage; the Dream Act; ending the death penalty; offshore wind energy. He has also made a dent in the state’s alarming pension deficit. Those have been important successes, which we’ve applauded.

Yet why has he been so passive when faced with a funding system for transportation that will run dry four years from now?

Mr. McDonnell’s success on transportation in Virginia was not a one-year wonder. It was the product of an astute campaign, begun three years ago, to answer or neutralize opposition to a tax increase from his own party. Systematically, he addressed every serious criticism and suggestion raised by conservatives — and then showed that the yawning gap that remained between the state’s means and transportation needs could be addressed only with new revenue.

If Maryland sees its competitiveness at risk as a result of the action in Virginia, maybe that goad leaders in Annapolis into action. As things stand, Virginia’s economy is well-placed to thrive, while Maryland’s future is in doubt.