Virginia Gov. Bob McDonnell led the charge for tax restructuring and increase to pay for transportation infrastructure. (Getty Images)

The dam holding back tax increases broke in Virginia this weekend as scores of Republicans — including a potential presidential contender — joined Democrats to endorse raising revenue to pay for transportation projects.

The sea change in Richmond marks the latest example of some emboldened Republicans defying an anti-tax orthodoxy and going against conservatives in their party. Virginia’s landmark transportation plan passed less than two months after dozens of congressional Republicans, including the party’s top two leaders, backed a deal with President Obama to increase taxes on the wealthy.

Initially prodded by Gov. Robert F. McDonnell (R), the General Assembly approved a complex package Saturday that restructures the commonwealth’s gas taxes while increasing sales taxes and other levies to boost a transportation fund that is running out of money in a state with areas that have some of the nation’s worst commuting times.

McDonnell, who is said to be mulling a White House run, commended the $880 million-a-year overhaul, which received support from half of the Republicans in the House of Delegates and eight of the 20 in the Senate.

“There’s not a single tax in the Virginia code that I have ever voted for,” said Del. David B. Albo (R-Fairfax). “To have somebody like me do this means it must be pretty bad. I looked at every single way to raise money for roads, and it is literally impossible to do without raising revenue.”

The circumstances in Washington two months ago were different from those in Richmond this weekend, but in both cases, Republicans were more willing to accept tax increases than they have been in recent years.

“It certainly did not hurt,” said Mark Rozell, a public policy professor at George Mason University. “Seeing that the party leadership in Washington was willing to be more pragmatic and accept taxes . . . I think made it much easier for Republicans at the state level to act.”

Like their counterparts in Washington, Republican leaders in Richmond had to rely on Democrats to pass the tax increase, and many on the right were withering in their criticism of the deal. A coalition of conservative Virginia bloggers wrote that the transportation deal betrayed their principles.

“Every Republican statewide official (and most legislators) were elected on a promise not to raise taxes,” the blogger said in the open letter. “This bill erodes the credibility of all future candidates and the ability of voters to hold said candidates accountable.”

Marc Scribner, a fellow at the Competitive Enterprise Institute, was especially harsh toward the governor.

“McDonnell is fast proving himself to be the Charlie Crist of the Mid-Atlantic — honoring no principles other than those he perceives will bring political gain,” Scribner said, referring to the former Florida governor who left the GOP and is considering a run for his old job as a Democrat.

Americans for Tax Reform head Grover Norquist, a critic of the transportation plan, said that only a few Virginia Republicans who had signed his group’s anti-tax pledge had violated it. (McDonnell did not sign Norquist’s pledge during his 2009 campaign, although he did say he had “no plans to raise taxes.”)

Norquist disputed that any pattern is forming, noting that other Republican governors around the country — particularly potential presidential contenders such as Bobby Jindal (La.), John Kasich (Ohio) and Mike Pence (Ind.) — are pushing to cut taxes in their states.

“He is by himself heading in this direction,” Norquist said of McDonnell. “The dynamic in Richmond is exactly opposite of what’s happening in all other Republican states.”

McDonnell has mounted a strong defense of the measure, saying after Saturday’s vote that most Virginians are “tired of the politics of dysfunction and inaction that we see in Washington” and want something different from Richmond. He continued that “Virginians have been paying a hidden transportation tax” because of increased congestion on the roads.

Although Republicans have an advantage in the Capitol, holding the governorship, a solid majority in the House and technical control of an evenly divided Senate, Virginia has become solidly purple in recent years just as tax issues have lost some of their ballot-box potency.

Obama ran on a promise to raise taxes, and he won reelection — he carried Virginia — with relative ease. In Virginia’s 2012 U.S. Senate contest, Timothy M. Kaine (D) also endorsed raising taxes on the wealthy, and outside groups spent millions pillorying him.

Kaine beat George Allen (R), who ran against any tax increases, by six points. Polls showed few Virginians considered taxes to be the most important issue in the race.

Republican state legislators were willing to endorse tax rises as recently as 2004, when several backed Democratic then-Gov. Mark R. Warner’s $1.5 billion increase. For their trouble, their faces were put up with Warner’s on a “Least Wanted” poster that was distributed by Norquist’s group.

But Republicans have long fought efforts to raise extra revenue for roads, repeatedly resisting Kaine’s efforts when he was governor.

“It was very difficult,” recalled Bill Leighty, who served as chief of staff to Kaine and Warner when they were governors.

What McDonnell is doing, Leighty said, resembles the Warner 2004 “playbook” in that both emphasized reforming and restructuring the tax system rather than explicitly calling it a tax increase.

“In the end, it was politically more possible to do it here because of the pent-up frustration over this issue,” Rozell said, referring to the state’s notorious traffic.

Pierce Homer, who served as Kaine’s transportation secretary, said McDonnell “has been a realist on the need for additional revenues, and he has encouraged consideration of revenue sources that were not thinkable statewide even five years ago.”

The biggest change between then and now, Homer said, is that more Republicans have recognized “the connection between infrastructure and economic development and job growth.”

Rozell and Norquist said Virginia Republicans did what they hadn’t been willing to do years ago simply because they were more likely to follow a governor from their own party. “It was like Nixon going to China,” Rozell said.

Laura Vozzella contributed to this report.