Six-term Sen. Orrin Hatch (R-Utah) survived a primary challenge Tuesday night, easily beating former state Sen. Dan Liljenquist .

With 6 percent of the vote in, Hatch led Liljenquist 69 percent to 31 percent.

The senator’s victory was not in much doubt. In fact, the primary almost didn’t happen. If a candidate wins the support of 60 percent of the 4,000 state GOP convention delegates, there is no primary. Hatch took 59.2 percent at the April convention. That meant a head-to-head with Liljenquist among the broader GOP electorate — a race for which Hatch was better funded and better prepared.

Four years ago, tea party activists took out Sen. Bob Bennett at the convention; he was replaced on the GOP ticket by now-Sen. Mike Lee. Conservatives geared up for a similar coup this cycle.

But unlike Bennett, Hatch was prepared for a tea party challenge and ran a very savvy campaign. He recruited supporters to run as convention delegates, effectively packing the event. Rep. Jason Chaffetz, seeing that Hatch would likely survive the convention, decided not to run. That left the far less well-known Liljenquist.

And unlike Sen. Dick Lugar (R-Ind.), who lost a primary to state Treasurer Richard Mourdock last month, Hatch ardently courted the tea party. Already a conservative, he apologized for his bank bailout votes and was one of just nine senators to vote against a 2011 budget deal designed to avert a government shutdown. His American Conservative Union rating went from 90 percent to 100 percent.

At the same time, Hatch’s campaign effectively demonized FreedomWorks — a tea party-oriented group backing Liljenquist — as an out-of-state interloper.

FreedomWorks spent $900,000 on the race and Liljenquist spent about $614,000. But they were swamped by Hatch, who put about $10 million into his bid.

If he completes his seventh term, the 78-year-old Hatch will become the longest serving Republican senator in history.