Two 20-year veterans of Virginia’s House of Delegates lost their seats Tuesday, falling to GOP primary challengers who assailed their support for a tax-heavy transportation funding overhaul.

Del. Joe T. May (Loudoun) and Del. Beverly J. Sherwood (Frederick) lost to political newcomers who railed against the transportation plan, which imposes a $1.2-billion-a-year tax increase.

But two other incumbent Republicans who had supported the legislation this year — House Speaker William J. Howell (Stafford) and Del. Robert D. “Bobby” Orrock Sr. (Caroline) — handily beat back challengers.

Gov. Robert F. McDonnell, eager to fill the state’s nearly drained transportation coffers, championed the legislation even as his original bill became laden with taxes. Republicans who supported the law cautioned against reading too much into May and Sherwood’s losses.

Del. John A. Cosgrove (R-Chesapeake), who voted for the transportation bill and is running for the Senate seat being vacated by the retiring Sen. Harry B. Blevins (R-Chesapeake), faced two opponents critical of that vote in a “firehouse primary” in May. He easily defeated both.

Del. Joe T. May (Loudoun)

Five Republicans faced primary challenges, four of them by anti-tax activists angry about the incumbents’ support for the transportation plan. No sitting Republican delegate had faced a primary challenge since 2005, when activists went after some of those who supported a $1.5-billion-a-year tax hike pushed by then-Gov. Mark Warner (D).

McDonnell challenged the General Assembly this year to solve a problem that had vexed his predecessors for nearly a generation: finding a sustainable way to pay for roads, highways and rail. Virginia has one of the nation’s largest and most congested road systems and was on track to run out of new construction funds by 2017. McDonnell proposed an $845-million-a-year plan that he billed as “revenue neutral” because it relied heavily on redirecting existing state revenue. The General Assembly essentially gutted his bill, turning it into a $1.4-billion-a-year plan that called for $1.2 billion in new revenue.

But McDonnell, eager to claim a big accomplishment in his last year in office, was willing to take the deal — one that anti-tax activist Grover Norquist blasted. Only half of the GOP caucus signed on, despite heavy lobbying from McDonnell, Howell and Lt. Gov. Bill Bolling (R) .

Of the 34 House Republicans who supported the final bill, four drew primary challenges. They were among the most senior delegates in Richmond.

Howell, a delegate since 1987, easily defeated Craig Ennis. And Orrock, a member since 1990 and vice chair of the Finance Committee, beat Dustin Curtis.

But Sherwood, first elected in 1994, chairwoman of the Agriculture, Chesapeake and Natural Resource Committee, was beaten by Mark J. Berg. May, a delegate since 1994 and Transportation Committee chairman, was defeated by Dave LaRock.

Del. C. Todd Gilbert (R-Shenandoah), who is deputy majority leader and opposed the transportation deal, handily beat tea party activist Mark Prince. Prince ran on a platform of reducing state and local government debt.

Candidate guide to the 2013 Virginia primary election

Two Democratic incumbents defeated challengers. Del. Rosalyn R. Dance (Petersburg), who this year flirted with supporting a controversial Senate GOP redistricting plan, was challenged by Evandra D. Thompson. Dance was elected in 2005 and sits on the Appropriations Committee. Del. Algie T. Howell Jr. (Norfolk), a delegate since 2004 and also an Appropriations Committee member, faced police officer Rick James.

In 2005, challengers defeated one sitting delegate, Gary Reese of Fairfax, who on different occasions voted for and against Warner’s tax increase.