In the five years since the first conservative activists dubbed themselves members of the tea party, they have been at the vanguard of change within the Republican Party. The GOP, once dominated by business interests and Beltway insiders, is now driven more by local activists far from Washington watching their members like hawks. Among the Democrats who have lost general elections and Republicans who have been deemed insufficiently conservative, the tea party has collected plenty of trophies.

No single candidate has felt the sting of the tea party movement more accutely than David Dewhurst.

Dewhurst has spent the last 12 years as Texas’s lieutenant governor, living in Gov. Rick Perry’s (R) shadow and pining for higher office. On Tuesday, content to run for a fourth full term as the state’s number two, he finished in second place, notching 28 percent of the vote against the leader, state Sen. Dan Patrick (R), who finished with 41 percent.

Patrick’s campaign demonstrated the new face of the Texas Republican Party in the wake of the tea party takeover. Where Republicans once nearly unanimously supported giving in-state tuition to the children of undocumented immigrants — a bill Perry signed in 2001 — Patrick ran a campaign focused in part on rolling back that law. He was the only candidate in the field to oppose the tuition plan back in 2001, he said in his first campaign ad (Dewhurst was a state lands commissioner at the time and didn’t have a vote).

What’s more, Patrick spent the race calling for new leadership after a decade of Dewhurst, a message of change that tea party candidates across the country have embraced.

“We will show the rest of the country what it means to be conservative,” Patrick told a crowd of supporters at his election-night victory party in Houston.

With an even smaller, more conservative electorate expected to turn out in the May 27 runoff, Dewhurst faces an uphill battle to overcome Patrick’s 13-point edge — a battle most Republicans in Texas expect him to lose.

It’s not Dewhurst’s first time in a runoff against a rival who has positioned himself to the right. In 2012, Dewhurst sought the Republican nomination to replace retiring Sen. Kay Bailey Hutchison against a crowded field. He led virtually every public poll by double digits over former Dallas mayor Tom Leppert, former ESPN commentator Craig James and a little-known lawyer who once served as Texas’s solicitor general, Ted Cruz.

For most of the race, Leppert appeared to be Dewhurst’s main rival. He had a political base in the vote-rich Dallas-Fort Worth area, and the personal fortune to fund his campaign. If Dewhurst and Leppert made the runoff, Dewhurst strategists believed he could win the head-to-head matchup.

But 2012 was also the first year that Texas Congressional districts would be redrawn in the decennial redistricting process. Texas had scheduled its primary election, both for federal offices and for the presidential nomination, for March 6. A panel of three federal judges objected to the new House lines and required the state to delay its primary until May 29.

That delay gave Cruz an opening. Little-known at first, he attracted support from outside conservative groups and lit up audiences around the state with his fiery rhetoric. Leppert flagged, and Cruz coasted into a healthy second place with 34 percent of the vote, 10 points behind Dewhurst. Cruz continued to gain among conservative activists; he easily beat Dewhurst in the July 31 runoff, taking almost 57 percent of the vote.

Two years later, Dewhurst finds himself in a similar position, fighting for statewide office against a rival who appears more conservative. In his own speech to supporters Tuesday night, Dewhurst suggested he will once again try to stake out a position on the right, especially on immigration.

“I want to shut it down,” Dewhurst said of the state’s border with Mexico. “Once and for all.”

But if history is any guide, Dewhurst faces a difficult 12 weeks before the runoff with Patrick. Barring a miracle that most Texas political observers don’t expect to see, Dewhurst will have lost the job to which he aspired in Washington, and the job he held so long in Texas. The tea party will have taken him out, twice.