WASHINGTON — For years, the White House saw House Majority Leader Eric Cantor as a chief driver of Republicans’ staunch opposition to nearly all of President Barack Obama’s agenda. Now, Cantor’s stunning primary loss seems likely to make politics even more difficult for Obama.

Rather than opening a pathway for the president, Cantor’s defeat could push Republicans more to the right and harden the House GOP’s hostility toward the White House, virtually dooming Obama’s efforts to pass a legacy-building immigration bill or other major legislation.

Robert Gibbs, a longtime Obama adviser, said any glee at the White House over Cantor’s defeat was “quickly replaced by the reality that this is the end of anything productive getting done legislatively in Congress either this year or maybe for the next several years.”

Cantor, the No. 2 Republican in the House, was soundly defeated by his tea party-backed opponent, a little-known economics professor named David Brat, in Virginia’s GOP primary Tuesday. Despite being massively outspent by Cantor, Brat rode a wave of public anger over calls for more lenient immigration laws, reducing the prospects that already reluctant House Republicans might take up a bill this year.

The day after his defeat, Cantor announced he would serve out his term but resign his leadership post this summer, sparking a flurry of maneuvering among GOP lawmakers eager to take his spot.

Cantor threw his support behind Rep. Kevin McCarthy of California, the House GOP whip and third-ranking leader. Rep. Pete Sessions of Texas also made clear his interest in being considered when House Republicans vote on a new majority leader on June 19.

Advertisement

Cantor’s surprise defeat was accompanied by a steady stream of gloating commentary from congressional Democrats and party operatives who saw the downfall of a top Republican leader as a coveted prize in this midterm election year. Yet, Brat, the winner of the race, promises to be even more uncompromising than Cantor.

The White House sought to dispel the notion that Cantor’s loss dealt a major blow to the president’s second term aspirations. Obama drew laughs at a Democratic fundraiser when he mentioned there had been an “interesting election” in Virginia, but took issue with pundits who said the politics of immigration now seemed impossible.

“I fundamentally reject that and I will tell the speaker of the House he needs to reject it,” Obama told about 40 big-dollar donors in suburban Boston.

Cantor has compiled a solidly conservative voting record during his seven terms in office, but he was sometimes viewed with suspicion by tea party activists who said he had been in Congress too long and was insufficiently committed to blocking immigration legislation.

Under different circumstances, the White House likely would have cheered the defeat of Cantor, who long has been a thorn in Obama’s side. Their relationship got off to a rocky start just days after Obama’s inauguration, when the new president chided Cantor for pushing a GOP-backed proposal for tackling the economic crisis. “Elections have consequences and, Eric, I won,” Obama reportedly said at the time.

The Virginia Republican became a deeper irritant to the White House after the GOP took control of the House in 2010 and Washington plunged into a series of fiscal fights. The president and Cantor had a particularly tense exchange during an August 2011 meeting on the debt ceiling, with the lawmaker telling reporters that the president stormed out of the room, a description the White House disputed.

Advertisement

But it was more than those frosty interactions that irked the White House. Obama’s advisers frequently claimed that Cantor undermined deals Obama struck with House Speaker John Boehner, R-Ohio, insisting on more conservative positions and throwing negotiations into chaos.

In recent months, the White House increasingly saw Cantor as the main impediment to Boehner’s bringing immigration legislation to the House floor, where it almost certainly would pass with a majority of Democratic votes. Obama’s advisers and immigration advocates had hoped that if Cantor pulled off a solid victory in his primary, he might give Boehner the green light to proceed.

White House officials publicly insisted that Cantor’s defeat would not stop Obama from pressing for immigration legislation. But that appeared to be little more than a rhetorical exercise, with the House GOP caucus likely to ramp up pressure on Boehner to shelve any plans to push a bill this year.

“It’s impossible to imagine the House moving forward on an explosive issue like immigration after what happened to Congressman Cantor,” said Jim Manley, a former adviser to Senate Majority Leader Harry Reid, D-Nev.

For Obama, that means losing out on what appeared to be his only opportunity to pass major legislation in his second term. The president is expected to now come under even greater pressure from immigration advocates who want him to take executive actions to stop deportations. The White House has held off on taking such measures in order to give Republicans space to move legislation.

The seeming death knell for immigration legislation also has big implications for the 2016 presidential campaign.

Some national Republican leaders have urged the party to back an overhaul of immigration laws in order to boost the GOP’s appeal to Hispanic voters, a rapidly growing subset of the electorate. Obama won more than 70 percent of the Hispanic vote in 2012.

But just as in 2012, Republicans who seek their party’s nomination in 2016 now appear likely to face the tricky choice between staking out conservative positions that could help them win the primary and more moderate stances that could play well in the general election.

Democrats are sure to exploit that dilemma. Already Wednesday, potential Democratic contender Hillary Rodham Clinton said Cantor was defeated “by a candidate who basically ran against immigrants.”