In March, as the Republican Party salivated over a favorable midterm map that showed control of the Senate was within their reach, Senate Minority Leader Mitch McConnell (R-Ky.) issued a warning to the Tea Party.

"I think we are going to crush them everywhere," he said. "I don't think they are going to have a single nominee anywhere in the country."

McConnell's remark would prove prophetic. Despite furious threats to boot "turncoat" bums from office, the Tea Party failed to pick off any incumbent Senate Republicans in the primaries this year. Attempts to unseat sitting GOP senators in Texas, Mississippi, Wyoming, Kansas, South Carolina, and Kentucky all fizzled. Bids to nominate fringe candidates in states with Democratic incumbents went nowhere, too.

In that respect, the 2014 midterms stand in stark contrast to the two preceding elections, when the GOP's embrace of the Tea Party as a potent distillation of anti-Obama angst backfired.

Though the 2010 midterms were a "shellacking" for Democrats, with the party shedding 63 seats in the House and six in the Senate, the losses could have been far more catastrophic had the Tea Party not helped nominate Ken Buck in Colorado, Sharron Angle in Nevada, and Christine "I'm not a witch" O'Donnell in Delaware. More moderate candidates could have easily won all three races, which would have knotted the Senate.

Two years later, Republicans again had a shot to flip the Senate. Yet obstreperous conservatives threw two easy GOP pickups by nominating candidates with appalling notions of rape. In Indiana, nominee Richard Mourdock said pregnancies resulting from rape were "something God intended to happen." And, of course, in Missouri there was Todd Akin and his scientifically baseless beliefs about "legitimate" rape.

Establishment Republicans were outraged at those humiliating defeats, feeling they'd been sabotaged by their own team. That frustration only grew in the wake of last year's government shutdown, when Sen. Ted Cruz (R-Texas) and Co. obliterated the party's approval rating. Finally, the party decided to fight back.

The GOP's election apparatus swung into action early this election cycle, seeking to undercut the Tea Party and prevent it from ever gaining steam.

In Colorado, the National Republican Senatorial Committee aggressively pushed Buck to drop his Senate bid before he could blow another winnable race. Buck relented in a brokered deal under which he ran for Rep. Cory Gardner's (R) House seat instead, allowing Gardner to run for Senate. Both candidates won Tuesday.

In Mississippi, Tea Partier Chris McDaniel, who was challenging Sen. Thad Cochran (R), posed "an existential threat to the entire party," according to Rob Collins, executive director of the National Republican Senatorial Committee. The NRSC dug up dirt on McDaniel and leaked it to the press, snuffing out his candidacy in a runoff.

Outside groups also came to the rescue, spending millions of dollars to help nominate the most electable candidates. The U.S. Chamber of Commerce dropped nearly $7 million on establishment picks in contested primaries. It spent $100,000 per day on a single ad boosting Cochran in the closing week of his race.

Other GOP donors followed suit, sending primary spending soaring to unprecedented levels this year.

Having learned from past defeats, a few anti-establishment groups also softened their rhetoric. The Club for Growth praised McConnell even as others denounced him for ending the government shutdown and raising the debt ceiling without destroying ObamaCare. And though it bankrolled Tea Partiers like Mourdock in previous elections, it backed the party pick in Alaska, Dan Sullivan, over his leading challenger, Joe Miller. Four years prior, it endorsed Miller in his successful primary bid to oust Sen. Lisa Murkowski (R). (She won the general as a write-in.)

McConnell himself offers a telling example of the GOP's more aggressive approach to intraparty skirmishes this time around.

Expected to face a little-known primary challenger, Matt Bevin, McConnell took no chances. Before Bevin had even joined the race, McConnell's team assembled a "kitchen sink" attack ad obliterating the Tea Party favorite, according to Politico. The day Bevin joined the race, Team Mitch spent six figures on attack ads. Despite McConnell's horrific approval rating — a December 2012 PPP poll named him the most unpopular senator in the nation — he won by 25 percentage points.

You know how the story ends. Republicans surfed a midterm wave to a Democratic wipeout, picking up a 52-seat majority in the Senate — a majority that should swell to 54 once Alaska's results are certified and a December runoff concludes in Louisiana. But had the party not nipped Tea Party challenges early on, the outcome could have been very different. Republicans would likely have still taken the Senate, but by a slimmer margin, and talk of waves and mandates would have been more muted in the aftermath.

"You get your best players on the field in November, avoid doing something that makes us look like we are not adult enough to govern, and hope the wave is big," McConnell told The New York Times in March.

The plan worked, and McConnell is in line to lead the first GOP-controlled Senate since 2006.