ANYONE WHO drives regularly on Northern Virginia’s roads wouldn’t be surprised to learn that the state has gone decades without a good overhaul of its transportation budget, which has been a pain for drivers and a drag on growth. But after years of partisan acrimony, legislative dysfunction and dashed hopes, its leaders are inching closer to finally changing that.

Late Monday night, Gov. Robert F. McDonnell (R) sent a landmark transportation bill back to the General Assembly with just a few amendments. Wisely, the governor left the finely tuned compromise essentially intact. The bill would raise $5.9 billion in desperately needed transportation funding over five years by slightly raising sales taxes, changing the way the state taxes gas so that it keeps up with inflation and raising some smaller fees. Lawmakers will consider the governor’s amendments in a quick session Wednesday, when they should assent to the amended bill.

As with any political achievement, many have already tried to take credit. Those most deserving are Mr. McDonnell and the faction of Republicans who faced conservative antipathy for supporting a bipartisan approach that acknowledged the long-obvious truth about Virginia’s roads — that they can’t be built for free. In facing up to the reality-defying elements of his party to enact an overdue bill that will help Virginia, Mr. McDonnell showed genuine leadership.

Others did not. Following Mr. McDonnell’s action on the bill, gubernatorial candidate and Attorney General Ken Cuccinelli II (R) tried to take some of the credit for himself. “I was honored,” he said, “to work with members of the McDonnell administration in making sure the legislation was able to move forward without the threat of any legal challenges.” Mr. Cuccinelli declared last week one element of the unamended transportation bill to be unconstitutional, leading to one of Mr. McDonnell’s amendments.

It would be easier to credit Mr. Cuccinelli if he hadn’t opposed the bill tooth-and-nail when the General Assembly considered it, condemning the legislation as a “massive tax increase” and pushing for a right-wing alternative. It would be easier still if the attorney general didn’t have a long history of opposing serious transportation policy in service to a no-tax creed. And his legal assessments would be far less suspicious if he weren’t simultaneously acting as Virginia’s top lawyer and running a political campaign for governor.

What was he doing offering official legal analysis, anyway? Mr. Cuccinelli just brought attention back to the fact that he has refused to resign as attorney general in his bid for governor, bucking a fine Virginia tradition. His predecessors stepped down because the attorney general shouldn’t put himself in a position in which he has to choose between his political interests and those of the law. Even if he makes the right calls, they still smell.

If Mr. Cuccinelli wants to associate himself with the success of this transportation bill, he should endorse it first.