It was not a good night for the right-wing set in North Carolina. In the first big test of the tea party war against mainstream Republicans, the latter won and won big.

Republican senatorial candidate Thom Tillis responds during a debate at WRAL television studios in Raleigh, N.C. (Pool photo by Gerry Broome/Associated Press)

Thom Tillis, the North Carolina House speaker, avoided a runoff with about 46 percent of the vote in a four-person race. Tillis was heavily backed by American Crossroads and the Chamber of Commerce, which along with veteran GOP groups spent $2.5 million on the race. Jeb Bush and Mitt Romney both endorsed him.

American Crossroads issued a statement Tuesday night congratulating Tillis and reminding GOP voters: “It was clear from the start that Thom Tillis is the only proven conservative who can defeat [Democratic Sen.] Kay Hagan and take on President Obama’s liberal agenda, and tonight’s victory is the first step toward making that happen. We engaged early and worked closely with other center-right groups to help Tillis overcome a late dirty-tricks campaign orchestrated by Hagan and national Democrats.”

Greg Brannon, an unvetted tea party favorite who during the course of the primary wound up on the wrong side of a jury verdict for misleading investors, had on his side groups such as FreedomWorks and the Tea Party Patriots as well as right-wing stars such as talk show host Mark Levin and Sen. Rand Paul (R-Ky.). He received a paltry 27 percent of the vote, despite Hagan’s attempts to aid his cause by attacking the more electable Tillis. Brannon proved to be a poor fundraiser, and even tea party groups could scrape together only a few hundred thousand dollars for him.

The outcome will strengthen Republicans’ argument that tea party type groups waste donors’ money and destructively attack conservative, electable candidates rather than go after Democrats. On the right there should be concern that the tea party groups take in millions from dedicated conservative donors but spend relatively little on actual races. The Post reported:

The lopsided spending underscores the financial might of establishment GOP groups that have rallied around candidates like Tillis this year. (American Crossroads raised $5 million in March, a sharp upswing after a lackluster fundraising stretch last year.) But the imbalance also spotlights the small sums that well-funded tea party groups are investing in direct campaigning for candidates, as The Washington Post reported last month. In lieu of spending on candidates and campaigns, these groups are plowing most of their money into overhead costs such as consulting and fundraising.

For Rand Paul, Brannon’s embarrassing defeat will deepen establishment Republicans’ skepticism about his drawing power and judgment. Why put his own reputation on the line for such a flaky character? (As Allysia Finley put it before the votes were counted, “Mr. Paul and his tea-party phalanx appear to oppose Mr. Tillis for no other reason than he’s the choice of the ‘establishment.'”) Opposing a Republican who cut taxes, passed education reform, expanded charter schools and capped unemployment benefits as insufficiently conservative suggests that Paul is out of step with a large chunk of the GOP electorate. At any rate, Paul made a dash to endorse Tillis this morning, hoping perhaps to remove doubts about his willingness to be a team player.

Tillis was not the only victory for mainstream conservatives. Incumbent GOP Rep. Renee Ellmers easily beat back an anti-immigration reform challenger in the 2nd congressional district with nearly 60 percent of the vote. When attacked for her support of immigration reform, Ellmers stuck to her guns, defending her views on right-wing talk shows and challenging the idea that reform amounts to “amnesty.” In the NC-7, mainstream groups including the YG Network, the Chamber of Commerce and the American Action Network backed David Rouzer, who won handily with nearly 60 percent of the vote over a right-wing opponent. North Carolina is hardly New Jersey, yet primary voters there plainly were in the mood to back electable conservatives over right-wingers.

Most important for Republicans, they now have the most electable and best-funded Senate opponent available to go up against the vulnerable Hagan. The question remains whether the time and money Tillis spent fending off Brannon and the tea party groups will impair his chances. For now, however, it seems that common-sense conservatives have the upper hand. That is bad news for the far right and for Sen. Harry Reid (D-Nev.). It is also a reminder that right-wing talk show hosts and Beltway operatives brandishing the tea party flag are not representative of GOP sentiment, even in an off-year primary.