The Republican establishment scored a victory in one of the final competitive Senate primaries on Tuesday in Alaska, as Dan Sullivan defeated a one-time Tea Party star, Joe Miller, and the state's lieutenant governor, Mead Treadwell.

Sullivan, the former state attorney general and natural resources commissioner, will now face Democratic Sen. Mark Begich in a critical general election battle that could help determine control of the Senate next year.

The Associated Press called the election for Sullivan early Wednesday morning, and with 98.6 percent of precincts reporting, he had 40 percent of the vote to 32 percent for Miller and 25 percent for Treadwell.

A Harvard graduate and a Marine lieutenant colonel, Sullivan was the best-funded candidate in the race and was seen by many Republicans and Democrats alike as the strongest potential opponent for Begich, who is gunning for his second term.

Joe Miller/AP

Miller was making his second bid for the Senate. He nearly won a seat in 2010 after defeating Sen. Lisa Murkowski in the GOP primary, but Murkowski exacted revenge by winning on an independent line in the general election.

Miller had the backing of former Alaska Gov. Sarah Palin and former Arkansas Gov. Mike Huckabee, but Tea Party groups did not support him as strongly as they did four years ago.

Sullivan declared victory early Wednesday and pledged in a statement to help "roll back the Obama-Reid-Begich agenda" if elected, according to the Alaska Dispatch News. Miller did not immediately concede and told supporters with about half the ballots counted that it was "not a done deal yet," the paper reported.

The chairman of the National Republican Senatorial Committee, Sen. Jerry Moran (Kan.), congratulated Sullivan on his victory and immediately went after Begich.

Mark Begich has championed the Obama agenda, and served on Harry Reid's leadership team that has brought the Senate to a grinding halt. Harry Reid's Senate no longer allows debate on ideas, amendments or bipartisan legislation which hurts domestic energy development and most certainly is a detriment to the Alaskan economy and job market. Even though Senator Begich has failed to pass even a single amendment during his five years in Washington, he has voted for the Obama agenda a staggering 97% of the time - including costly energy taxes, spending increases, and of course, ObamaCare.

I look forward to serving with Dan Sullivan in a new Republican majority that is focused on getting things done from the bottom up rather than the top down, which will not only benefit Alaska but the rest of our country."

Democrats sought to link Sullivan to Palin (who endorsed Miller) and to the Koch brothers. In a statement reported by The Hill, the deputy director of the Democratic Senatorial Campaign Committee, Matt Canter, said:

After carrying water for Sarah Palin and trying to restrict access to public lands for hunters and fishers, Sullivan is now hoping to do the Koch brothers' bidding in the US Senate. Sullivan is an Outsider and his campaign is bankrolled by Outside special interests that want to privatize Medicare and Social Security, eliminate a federal minimum wage, and protect tax breaks for companies that ship jobs overseas."