Dan Sullivan, the former Alaska attorney general and natural resources commissioner, declared victory early Wednesday in one of the most divisive Alaska Republican primaries in decades, while Fairbanks lawyer Joe Miller ran 8 points behind in second place. Lt. Gov. Mead Treadwell trailed third in the fight to take on Democratic Sen. Mark Begich in the fall.

With more than 98 percent of precincts reporting, Sullivan picked up more than 40 percent of the vote, followed by Miller with 32 percent and Treadwell with 25 percent. The Associated Press called the race for Sullivan at about 1:15 a.m. Wednesday. In a statement, Sullivan said he looked "forward to painting a clear contrast between Mark Begich's inability to move our state forward and my vision for a brighter and better Alaska."

A short post of Joe Miller's blog, "Restoring Liberty," early Wednesday morning said Miller had called Sullivan to congratulate him. "While there are still over 20,000 absentee ballots to be counted and several major precincts yet to report, it seems unlikely we will be able to close the 7000 vote gap, given the current trends. I have called and congratulated Dan Sullivan for running a strong campaign."

Sullivan, 49, a graduate of Harvard and Georgetown, joined the Marines in 1993 and is a lieutenant colonel in the Marine Corps Reserves. He pledged to work to "roll back the Obama-Reid-Begich" agenda, saying he was the conservative who can win in November.

Pre-election polls showed the well-funded Sullivan topping Treadwell and tea party favorite Miller, though he had never run for office before. Sullivan had far more success tapping the deep pockets of major Outside donors than his opponents, who are both veterans of previous successful statewide campaigns.

Miller had told supporters the primary election was "not a done deal yet" with about half of ballots counted Tuesday night. "It could still be turned around," Miller said, adding that his campaign worked hard to encourage people to vote absentee -- ballots that have not yet been counted.

Treadwell said he made a call to Sullivan not to concede but to congratulate Sullivan as "a standard-bearer for our party that can beat Begich in the fall."

"He's clearly ahead and will likely be declared the winner," Treadwell said in an interview.

Sullivan married Alaskan Julie Fate, the daughter of Fairbanksans Mary Jane and Hugh Fate, and has lived in Alaska from 1997 to 2002 and from 2009 to the present.

Begich, 52, began his political career in 1988 on the Anchorage Assembly. He served two terms as mayor before narrowly beating Sen. Ted Stevens in 2008.

The contest plays into national power politics for control of the Senate. Republicans need a gain of six seats to take power.

Money and influence

Bruce Edwards, a 65-year-old volunteer on the Sullivan campaign, said he voted for Sullivan because he thinks the Republican can beat Begich in the general election.

Alaska needs a senator with clout outside of the state, he said.

"Let's face it, the Senate is federal, not state," Edwards said. "The bottom line is this: Dan Sullivan has got money and he has got influence."

Christopher Waetjen, 24, an accountant for a food company, said he voted for Miller.

"I don't trust politicians," he said. "I vote pro-life and I like how he's very staunchly pro-life."

The buildup to the vote Tuesday was unlike any other in the state's history, in both its intensity and duration.

In addition to the spending directly by the candidates, committees not controlled by the candidates spent millions more to influence voters, pushing the overall total to about $15 million so far.

The GOP candidates spent months and millions competing for the attention and support of the conservative voters who control Republican primary contests. While they devoted considerable energy to attacking Begich and President Obama at every opportunity, they also took aim at each other in the closing weeks of the campaign, looking for an edge.

Miller called on the other two to support the impeachment of Obama, while all three complained of federal interference in Alaska and declared their opposition to gun control and abortion.

For his part, Begich spent about $5 million, and while he had only token opposition in his primary, the former Anchorage mayor has long been in full campaign mode. He enters the general election campaign with about $2 million in reserves.

Sullivan spent about $3 million and had nearly $1 million left as of the end of July, while Treadwell had $141,743 and Miller had $188,236.

Main event still to come

In the months ahead, with a clear one-on-one contest, campaign funds are unlikely to be a problem on either side, while Outside groups are expected to step up their efforts because of the national implications.

"They are going to be coming in the next two months with a heavy load of money, with a heavy dose of negative advertisement," Begich told a group of 70 supporters at his primary night party Tuesday, citing the fact that his Republican opponents have reserved television advertisements that begin running Wednesday.

"You can rest assured they will continue doing what they've been doing, putting out misinformation, telling stories, because they hope and they believe that Alaskans will not get it," he said.

The Republican primary contenders had numerous confrontations that saw the candidates pinned down on a string of contentious issues, from abortion to immigration to tribal law. Democrats said they were prepared if the Republican nominee tried to moderate the tough stances he'd outlined over the last few months.

Many of the positions staked out by the Republicans during the primary campaign are "profoundly inconsistent with what Alaskans think," said Zack Fields, a spokesman for the Alaska Democratic Party.

"Whether or not they try to flip-flop on those issues for political expediency, we're going to hold them accountable for what their position actually is. Primaries tend to show what people actually think," Fields said.

Randy Ruedrich, the former chair of the Alaska Republican Party, responded: "Our candidate doesn't need to become a Democrat to win."

Ruedrich pointed out that Begich has his own record that Republicans will dig into during the general election, including his tenure in the U.S. Senate and his nearly six years as mayor of Anchorage.

"There are so many things that Begich has done that will haunt him," Ruedrich said. "You could write several books on those things he'd like to forget."

Third-party attacks

The primary campaign unfolded over a series of debates, forums, and candidate appearances where each of the Republicans outlined their own set of conservative principles.

It also unfolded in a costly ad war on television, where Sullivan, who attracted the most money and support from establishment Republican groups, came under sharp attacks from a Democratic super PAC aligned with Begich.

The super PAC, Put Alaska First, spent $4 million on a negative advertising campaign that argued Sullivan tried to cut off hunting and fishing rights as part of a controversial permitting and water rights bill he worked on while he was the state's natural resources commissioner.

Put Alaska First strategist Jim Lottsfeldt said the ads were designed to give Begich some room to broadcast his own message, and to "push back against people who were preparing to anoint Sullivan the winner."

But some Republicans saw the campaign as an attempt by Democrats to select a weaker opponent, in the form of Miller. Taylor Bickford, a Republican political consultant in Anchorage, cited a set of last-second online ads from Put Alaska First that highlighted Miller's views on abortion, and his goal of impeaching President Barack Obama.

"Why else would you be telling Republican primary voters that he wants to impeach President Obama?" Bickford said, describing Put Alaska First's strategy as "very clearly trying to move Sullivan and Treadwell votes over to Joe Miller."

"They've essentially couched positive messages in ads that look and feel like attacks," Bickford added.

Asked whether his group had prepared material in anticipation of a particular candidate winning the primary, Lottsfeldt declined to comment, though he added that "we'll take any comer."

"The voters are re-setting the table," he said. "Come Wednesday morning, we will look and see how the table is set, and best figure out how to be a constructive force."

Put Alaska First has received almost all of its funding from the Washington, D.C.-based Senate Majority PAC.

The spending spree of recent months foreshadows what is universally expected to be the most expensive general election the state has known.

Reporters Devin Kelly and Tegan Hanlon contributed to this story.