No one in the political world a year ago would have predicted Sen. Lindsey Graham (R-S.C.) would win his primary without need of a runoff while House Majority Leader Eric Cantor (R-Va.) would lose his seat to college professor David Brat — by double digits. Now and then politics does surprise virtually everyone.

We have doubted for some time that Graham was truly “vulnerable,” as so many right-wing pundits claimed. He amassed a war chest, kept up a string of conservative votes on everything from guns to defense spending and took his race seriously from the beginning.

As for Cantor, everyone seems to have an explanation for the stunning defeat. He favored immigration reform. No, he didn’t push hard enough on immigration. He flip-flopped on immigration reform. He was too busy traveling and talking about national politics to stay in touch back home. He was too attentive to K Street and big business. Less discussed are a couple of other factors. As a result of the 2010 redistricting, Cantor wound up with a much more conservative district; ultimately, the “safe” seat came back to bite him as hard-core tea party activists worked themselves into a frenzy. Additionally, a Virginia Republican veteran of many campaigns observed that while Cantor’s opponent was still an unknown, Cantor launched a huge, over-the-top ad campaign. He thereby “kicked the hornet’s nest” and elevated his opponent.

Although Beltway groups that have slapped the “tea party” label on their foreheads may rejoice, this was not their victory. Cantor was not a targeted candidate, and these groups did not sink money into the race. This was, if anything, a truly grass-roots revolt in Cantor’s back yard. Moreover, the race reminds us that the smaller the race, the better the chance strong-willed activists can pull an upset. That means House races are generally an easier venue than larger statewide races. (Recall that Rick Santorum did well in caucuses with low turnouts in 2012.)

Beyond the GOP leadership fight that will ensue (more about that in a minute), Cantor’s defeat will complicate a number of initiatives. Cantor was presumably working toward an Obamacare alternative. That task may now fall to House Budget Committee Chairman Paul Ryan (R-Wis.), who is fully capable of putting a plan together. Or, it may falter altogether — which may give Democrats back their argument that the GOP has no replacement for the widely disliked health-care law. Ryan, the speaker of the House and those members with reform plans, including Rep. Tom Price (R-Ga.), would be wise to push ahead with that effort.

As for immigration reform, time already was slipping away for the House to act, and with each new Obama scandal the appetite for diverting attention to a controversial topic was shrinking. Whatever gets done on immigration reform almost certainly will have to wait until after the midterms or for a new president. No matter how safe most incumbents now are and no matter that polling shows the overall popularity of immigration reform, anti-immigration activists will be convinced that immigration reform equals doom. Too many members will buy that line. The disgraceful and false accusation that Cantor favored “amnesty” was not sufficiently rebutted; instead, Cantor turned into an immigration hawk at the end of the race. It is important to engage critics on the merits and to stand up for a sane, well-balanced immigration plan. Polls show that a majority of Republicans in Cantor’s district favor immigration reform, but in this instance, the opponents plainly had the energy on their side.

The shame of it is that Cantor understood precisely what the party needs to fight for — a positive, pro-middle-class and lower-class agenda, an Obamacare alternative and bold opposition to the president’s foreign policy. Those positions will be carried by others in the party and in the reform conservative movement more generally, but Cantor deserves credit for steering the party in a positive direction when many members wanted to do nothing but beat up on the president. Although he faltered, it’s the forward-looking and positive agenda that will enable Republicans to win Senate seats and possibly the White House. On Israel and foreign policy more generally, Cantor is one of the most informed and effective members of the House, a body not known for driving foreign policy. Those conservatives who favor a strong defense and robust U.S.-Israel relationship have lost an important ally.

Cantor’s defeat will start a free-for-all for the majority and whip positions. That may be a good thing; new blood and competitive races can be real positives in politics. Names mentioned to succeed Cantor include Jeb Hensarling (Tex.), Jim Jordan (Ohio), Steve Scalise (La.), Cathy McMorris Rodgers (Wash.) and even Paul Ryan. The party would be wise to diversify its leadership and bring on a creative reformer who can unite all factions of the House conference.

As for 2016, Cantor’s defeat means virtually nothing. The GOP will need a presidential nominee with broad center-right appeal, an attractive and forward-looking agenda and a happy but tough-as-nails demeanor. That was true before Cantor’s defeat, and it remains true today. With the exception of Sen. Ted Cruz (R-Tex.), virtually every contender who has been mentioned backs some sort of immigration reform, and that isn’t likely to change. If anything, Cantor’s defeat reminds us that the most decisive factors in any election are often the individual candidates and the quality of their campaigns.