RICHMOND -- Gov. Bob McDonnell overcame history and at times his own Republican Party to finally pass a legacy-defining financial fix to Virginia's long-standing road woes.

Virginia governors are rarely effective in the fourth and final year of their one-term reigns. Yet over the course of the 45-day session that ended Saturday, McDonnell used the power of his office and the friendships he built during two decades in state politics to push through $3.5 billion in new taxes and fees to fill potholes, pave roads and unclog some of the nation's most congested highways.

"He and I were first elected side-by-side 22 years ago," said Sen. Frank Wagner, R-Virginia Beach, one of 10 lawmakers who forged the agreement. "When he sets his mind to do something, he'll get it done. That's the kind of dogged worker he is."

In uniting the General Assembly around a transportation package, however, McDonnell divided his own party heading into an election year. While most Democrats supported the plan for higher taxes on shopping, cars, home sales and hotel stays, only about half of the General Assembly Republicans joined them.

The GOP pick to succeed McDonnell, Attorney General Ken Cuccinelli, twice nearly foiled the compromise he called an "enormous tax increase."

Conservative groups accused McDonnell of betraying the party. Del. Mark Cole, R-Fredericksburg, voted against the compromise and said "time will tell" if McDonnell is remembered as the governor who broke a promise to not raise taxes or the leader who finally fixed gridlock on Virginia highways.

McDonnell shrugged off any criticisms moments after the General Assembly adjourned, noting President Reagan raised the gas tax to fix highways.

"As I've watched conservatives throughout history, what they've tried to do is do the right thing at the right time," McDonnell said. "I'm governor of Virginia, and I'm going to do the right thing at this time to be able to grow jobs and create opportunities."

Though his fellow Republicans were reluctant to approve the transportation compromise, GOP leaders did do McDonnell a favor in his last session by avoiding divisive social issues, like abortion, that caused the governor problems in the past. Senate Republicans nearly brought the statehouse to a halt by ramming through a new redistricting proposing that inflamed Democrats. But House Speaker Bill Howell eventually killed the measure.

McDonnell, like his predecessors, labored for years to resolve the state's transportation funding problems before finally securing a landmark legislative victory.

"The governor, to his credit, started this process," said House Minority Leader David Toscano, D-Charlottesville. "If he signs this, it will be a key element of his legacy."

That will be critical as McDonnell contemplates the next step in his political career, which could include presidential aspirations in 2016.

"He's got a great record to look back on, but I don't know why he'd want to do anything else," Howell said. "Being governor in Virginia is the capstone of a career."