House Majority Leader Eric Cantor (R-Va.) lost in a major primary upset Tuesday night to a political newcomer — economics professor David Brat.

While no one saw Cantor’s loss coming, he’s been in a few public scrapes with the conservative side of the Republican Party over the last year. Here’s a quick summary of three recent examples of how he veered from the base in ways that likely contributed to his historic loss:

Eric Cantor House

House Majority Leader Eric Cantor’s primary loss was a surprise, but looking back over the last year, the warning signs were there. (AP Photo/Steve Helber)

1) The House’s Controversial ‘Doc Fix’ Vote

Back in March, GOP leaders faced a tough vote. They were under pressure to pass legislation that would avoid a 24 percent cut to Medicare doctor reimbursement rates.

The so-called “doc fix” vote is one that had happened numerous times before: In 1997, Congress created a plan to slowly cut doctor payments as part of a plan to balance the budget — but then routinely passed bills to avoid the cuts.

This year, many were hopeful that the entire 1997 plan could be scrapped. But as the April 1 deadline approached, GOP leaders decided to shelve plans for a permanent fix, and pass just another temporary fix.

That made House passage doubtful. Republicans called up the bill under a process that lets the House pass bills quickly — they get less debate, but they need a two-thirds majority to pass.

About 50 or 60 Democrats would be needed to pass the bill, and that was assuming that every Republican voted for it. But rather than see where the votes lay by holding a recorded vote, GOP leaders conspired with Democratic leaders to quickly pass the bill in a voice vote.

Many Republicans were stunned, since few GOP members were present to call for a recorded vote. Those who were there seemed too stunned to make the request.

Later that day, an angry Rep. Louie Gohmert (R-Texas) took to the floor to say the move was “outrageous.” Gohmert said he and others would make sure to always have someone on the floor to prevent that from happening again.

“So I am very surprised today that with us in the majority, our own leadership in charge, something as important as the doctor fix would be brought to the floor on a voice vote,” he said. “Now I know that I need to get with some other members and make sure we have people on the floor, since we won’t be sure what our own leadership is going to do.”

2) The Sneaky STOCK Act Vote: Another Process Controversy

The STOCK Act was widely hailed as a way to ensure members of Congress and senior officials don’t profit from their inside knowledge of policy decisions.

Among other things, the Stop Trading on Congressional Knowledge (STOCK) Act required senior government officials to put some of their financial information online.

That requirement prompted complaints from many of these senior officials that the law required too much information to be made public. But rather than debate ways to change the law in open, GOP leaders quickly called up a bill in 2013 to repeal the requirement, and it was passed in a voice vote.

Cantor himself called up the bill and passed it, with no debate.

While the move was not debated much among members, it was widely noticed in the press and among conservative groups, in part because of the speed and silence used to quickly amend a law that most praised as a transparency breakthrough when it first passed.

In one stroke, the quick vote showed the power that leaders like Cantor sometimes feel compelled to wield, but also sowed some discontent among conservatives.

3) And of Course, Immigration

While no one issue can be singled out as the reason for Cantor’s loss, immigration was undoubtedly one of the key factors. Just a few weeks ago, Cantor openly expressed support for legislation that would allow illegal minors to gain legal status for serving in the military.

“I am mindful and support the fact that if a kid who’s brought here by his or her parents unbeknownst to that child, has never lived anywhere else or remembers living anywhere else, and wants to serve in our military, should be able to do so,” Cantor said on the House floor on May 22. “And it’s my position that that child should have a path to citizenship after that service.”

Cantor was talking about the ENLIST Act, an idea that some Republicans tried to put on the 2015 defense policy bill. Cantor said he supported the concept, but thought the defense bill was the wrong place to have the debate.

But Cantor clearly indicated he was looking at ways to advance this idea.

“I remain committed to what the intent of the ENLIST Act is trying to achieve,” he said in May. “There are members involved who are working on the necessary language to see whether it is possible for us to move forward on that measure.”

Like other GOP leaders, Cantor had been mindful to say that major progress on immigration was not possible until President Barack Obama demonstrated that he could be trusted to enforce U.S. border laws.

But many Republicans believed they saw the writing on the wall, and feared Cantor would quickly engineer some kind of immigration deal with Obama at some point. David Brat, who beat Cantor Tuesday night, said repeatedly that Cantor favored “amnesty,” and warned that a Cantor win would lead to a deal in the near future.

The flood of unaccompanied children over the southern U.S. border, which seemed to spike over the last week or two, seemed to serve as something that heightened these fears on the right even more. Many feared Democrats would pressure leaders like Cantor to reach some deal on legal status under the guise of helping thousands of these children, many of whom are living under squalid temporary conditions in Arizona.

Another warning sign on immigration fell on the day of Cantor’s primary contest. Senators released legislation proposing $1 billion in new spending to deal with immigration situation at the border, which many are now calling an emergency humanitarian crisis.

Other Must-Read Stories