Ken Cuccinelli II, Virginia attorney general and GOP gubernatorial candidate, concedes the race in at the downtown Marriott Hotel in Richmond, Va., on Tuesday. (Nikki Kahn/The Washington Post)

The Republican establishment went into last week’s off-year elections believing that the tea party insurrectionists who have ripped apart the GOP in recent years would suffer enough damage to force them into some kind of retreat. But no one thinks that happened.

The expectation now is that the long-running internal battle for the soul of the party will continue deep into next year and beyond, possibly harming prospects at the polls in 2014 and 2016.

Rather than the humiliating defeats the establishment had expected, tea party candidates suffered narrow losses Tuesday despite being outgunned by opponents with far deeper financial pockets. In Virginia, Ken Cuccinelli II, the tea-party-aligned attorney general and GOP nominee for governor, lost by just 2.5 percentage points after polls had predicted a Democratic rout.

“Had we not had the shutdown, Cuccinelli would have won,” said Sen. Orrin G. Hatch (R-Utah), who beat back a 2012 primary challenge and has emerged as a leading critic of the tea party.

In Alabama, a tea-party-backed House candidate with a minimal grasp of important policy issues almost survived the six-figure media campaign launched against him by the business wing of the GOP. He lost to a well-known former state senator by fewer than 4,000 votes.

Three takeaways from Election Night: In Play takes a closer look at the big themes of the night from Virginia and New Jersey. (The Washington Post)

“I think the tea party remains very formidable. I mean, the business community weighed in heavily on the side of the state senator,” said Sen. John McCain (Ariz.). He described the establishment response to the Alabama race as a “sigh of relief [rather] than an expression of victory.”

Some tea party lawmakers said the results merely showed that they need more kindred spirits on Capitol Hill to take that fight to President Obama and the Democrats. “I think we need more leaders in Washington with the courage to stand for principle,” Sen. Ted Cruz (R-Tex.), the main lawmaker behind the government shutdown strategy, told reporters Wednesday.

Those results convinced some establishment Republicans that they need to confront the GOP’s conservative base more aggressively, both as a way to protect the candidacies of mainstream conservatives and to deflect damaging policy proposals that have limited appeal beyond far-right conservatives from advancing in Washington.

This counterinsurgency effort emerged recently after the party’s establishment spent the past three years tolerating the tea party movement on the assumption that it was a fad that would fade away.

Instead, those Republicans aligned with the tea party grew more forceful and drove a strategy that led to the partial government shutdown in October. The outside constellation of Washington-based groups that funded these arch-conservative campaigns has helped line up a historically large contingent of primary challengers to Senate incumbents in 2014.

The simmering feud between the tea party and the GOP establishment reached a boil last month when the Senate Conservatives Fund endorsed the primary opponent of Senate Minority Leader Mitch McConnell (R-Ky.). That move unleashed a new level of vitriol from establishment figures at those outside groups, and some worry that the infighting will hurt Republicans in upcoming elections.

Hatch all but endorsed New Jersey Gov. Chris Christie (N.J.) for the 2016 GOP presidential nomination after Christie’s landslide reelection Tuesday in a Democratic-leaning state. Hatch lamented that the GOP might be “too stupid” and push Christie away because the governor does not embrace tea party tactics.

On the campaign front, a senior GOP adviser declared that Senate Republicans intend to wade into the 2014 primary contests to help the best candidate emerge.

“There’s no rules,” said Rob Collins, executive director of the National Republican Senatorial Committee. “I treat every state differently. The path to getting a general-election candidate who can win is the only thing we care about.”

In recent years, the NRSC has stayed out of most primaries only to watch Republican chances in the general election evaporate as contentious primaries produced what they regard as less-than-desirable candidates. This time, Collins said, his group is in the “wins business” and will try to knock out some candidates if it means long-term victory.

Perhaps more important, some establishment-backed conservative groups are wading into House GOP primaries even when there is no chance that the seat would flip to Democrats. That’s what occurred in Alabama’s 1st Congressional District when Jo Bonner (R), a longtime friend of House Speaker John A. Boehner (R-Ohio), retired mid-term and a special election was set up this fall.

The GOP nomination fight came down to Tuesday’s matchup of former state senator Bradley Byrne against Dean Young. Byrne’s roots were solidly conservative but with a business background. Young hails from the pulpit wing, criticizing same-sex marriage, suggesting that Obama was born in Kenya and vowing never to support Boehner as speaker.

The prospect of a Young win worried GOP leaders. He would have added to a contingent of several dozen House Republicans from safe districts that forced leadership’s hand into the shutdown, never fearful of the fallout on their own standing at home. This time, rather than sitting back, the U.S. Chamber of Commerce and Ending Spending, a group funded by TD Ameritrade founder Joe Ricketts, poured almost $300,000 into the race in support of Byrne.

Most went to ads, but plenty went to direct-mail pieces designed to increase turnout. One depicted Byrne as a “strong conservative” who would ensure Minority Leader Nancy Pelosi (D-Calif.) “never again” could become speaker.

“One of our post-election takeaways was, we need to be more involved in primaries,” said Scott Reed, political adviser to the U.S. Chamber of Commerce.

Byrne won narrowly, sounding what some described as a wake-up call.

“When somebody runs a campaign still saying that Barack Obama was born in Kenya, that ought to be the first clue — probably the only clue you need — that we probably ought to support the other guy,” said Sen. Jeff Flake (R-Ariz.), a 12-year House veteran who won his Senate seat after a contested primary last year.

The most contentious fight is McConnell’s primary against businessman Matt Bevin, a first-time candidate who has courted Senate Conservatives Fund. The group, founded by former senator Jim DeMint (R-S.C.), ran a series ads in August pressuring GOP senators to support the shutdown in an attempt to force Obama to delay his health-care law.

GOP insiders viewed those ads as a fund-raising plan, and then in September the group ran a $300,000 ad campaign against McConnell, infuriating the NRSC and other Republican establishment figures. Collins confirmed that the committee told the consulting firm working with the outside group that it would be shut out of business with the deep-pocketed NRSC.

Some conservative activists called this a petty reaction by the establishment. Overall, insurgent challengers have emerged in GOP primaries against McConnell and Sens. Lamar Alexander (Tenn.), Thad Cochran (Miss.), Mike Enzi (Wyo.), Lindsey O. Graham (S.C.) and Pat Roberts (Kan.). Several of those are in safe Republican terrain regardless of the primary outcome.

“They can’t pretend their goal is to win a majority when they work against conservative candidates in solid Republican states where the conservative is just as electable as the establishment candidate,” said Matt Hoskins, head of the Senate Conservatives Fund. “It shows that their true objective is to protect incumbents and to elect moderates even if it wastes money and hurts the party.”

Jackie Kucinich and Ed O’Keefe contributed to this report.