Two weeks ago, Sen. Lisa Murkowski was the sure winner of the Alaska Republican Senate race. As of Aug. 4, she had raised nearly $3 million for her campaign, according to the Federal Election Commission, compared to $283,473 raised by her opponent, Joe Miller.
Not one poll had Miller even close to Murkowski.
With 98 percent of precincts reporting, the Tea Party-favored candidate and once a virtual unknown is ahead of Murkowski with 51 percent of the votes, and is expected to overtake the incumbent and the Democratic challenger to become the next senator from Alaska.
Even though she was trailing behind, Murkowski projected confidence at a press conference this afternoon: "We know for a fact that it ain't over yet until it's over," she said, adding, "There is much, much yet to be counted."
The Alaska Elections Division said it will have its first count of absentee ballots on Aug. 31 so results may not come for another two weeks. But some say those figures are unlikely to make a difference.
"It was a David and Goliath kind of thing. I don't think anyone gave the possibility of Joe Miller winning much credibility until the last couple of days," said Alaska pollster Ivan Moore. "It's a huge surprise and I think Lisa got caught napping."
Some Republican insiders blamed Murkowski's apparent loss on her not taking Miller's threat seriously enough. One Republican strategist said that Murkowski's campaign was advised 10 weeks ago to use her huge monetary funds to attack Miller.
Instead, she targeted President Obama and touted her work in helping Alaskans. It was only on Aug. 23 -- a day before the elections -- that she finally went up with a negative radio ad against Miller. At that point, it was too late.
"Lisa made a fatal error," GOP pollster and political consultant Marc Hellenthal said. "She was attacked with negatives and she ran her ads against Obama, who wasn't on the ballot.
"She didn't bother to say to anybody that the negatives weren't true. She blew a phenomenal lead, a 40-point lead."
Miller is a self-described "constitutional conservative" who has earned high-profile endorsements -- Palin, Mike Huckabee, and conservative commentators Laura Ingraham and Mark Levin. Miller said on "Top Line" that he doesn't believe unemployment benefits are constitutionally authorized, and has defended the overt display of guns in his rallies.
In the past week, he bombarded Alaskans with negative ads accusing Murkowski of supporting Obama's agenda, voting for the $787 billion stimulus package -- which she did not do -- and not pushing to repeal the health care law.
Murkowski also took a beating for being too soft on abortion, a hot-button issue among conservatives. Miller's campaign accused the incumbent senator of not being pro-life.
Murkowski's voting record on the issue is mixed. Most recently, she voted for restricting United Nations funds for population control policies but voted no in 2007 on a measure that would have barred Health and Human Services from giving grants to organizations that provide abortion services.
But the incumbent senator didn't fight back until very late, or make any of these issues a focal point of her campaign, giving her opponents free rein on what they could say.
Perhaps another political shift that Murkowski didn't gamble on was the power of Palin's endorsement and the Tea Party's influence, one that many say helped change the course of the race.
Palin's approval rating in the state has declined since she stepped down in July 2009. In a poll conducted in April by the Dittman Research Corp., 46 percent of Alaskans had a favorable view of Palin, while 52 percent held an unfavorable view.
But among the core GOP base, the former Alaska governor remains a formidable force. The same poll found that 71 percent of registered Republicans had a favorable opinion of the former vice presidential candidate.
Unlike some of her "mama grizzlies," Palin remained behind the scenes in Miller's campaign. She didn't appear in any TV ads or at rallies for him, and only recorded one robocall toward the end.
But it was Palin, Republican insiders say, who helped pull the purse strings. Her political action committee gave $5,000 to Miller's campaign, and helped with getting the Tea Party Express to bankroll much of Miller's campaign.
It's unusual for national money to pour into Alaska for midterm elections, except for when an incumbent is running. But Palin changed that game.
"With her kind of name brand, it was easy for the Tea Party to say, 'Give me your money, this was Sarah Palin's candidate,'" said veteran Alaska reporter Shushannah Walshe, who co-authored "Sarah from Alaska" and is a contributor to the Daily Beast.
Republicans say Palin's quiet emergence in the Senate race is a testament to the long-standing feud between the two families. Palin was one of a handful of candidates Murkowski's father, Frank, had picked to replace him in the U.S. Senate when he became governor in 2002. In the end, however, he ended up choosing his daughter, Lisa, despite allegations of nepotism.
Palin beat Frank Murkowski in the 2006 gubernatorial race as his ratings tanked.
Sen. Murkowski herself didn't enjoy as much popularity as some may have thought, as evident by this primary, Moore said.
"It was always lurking underneath the surface. How she was appointed in the first place allowed a lot of people to let her go quite easily," he said. "Most people don't kick incumbents out when they're reasonably popular, but people found out in the end their loyalty to Lisa really fundamentally wasn't very strong."
The cold relationship between Murkowski and Palin is widely documented. Murkowski took a stab at Palin for stepping down as governor. On Tuesday, she again assailed the former veep candidate for being out "for her own self-interest" and not "Alaska's interest."
Palin, meanwhile, targeted the family dynasty in her robocall for Miller.
"She's waffled on the repeal of Obamacare, co-sponsored cap-and-trade and voted for TARP," Palin said of the Troubled Asset Relief Program. "Joe Miller has the right ideas for Alaska."
Murkowski's loss would be a huge blow to the Republican establishment. Not only was she backed by the national GOP, she was also part of the Republican leadership. She would be the second incumbent to lose, after GOP Sen. Bob Bennett of Utah, and the third incumbent senator to take a fall.
Miller, whose rallies grabbed national headlines for featuring gun-toting supporters, is likely to sail to victory if he wins the primary. His Democratic opponent, Sitka Mayor Scott McAdams, has $4,000 in the bank.
Even Democratic National Committee spokesman Brad Woodhouse could not recall McAdams' name when asked on "Top Line" today if national Democrats would support him.
In a press conference this afternoon, Miller, a commercial fisherman, berated Miller's negative campaign and pushed back on the idea that he should drop out for a more experienced Democratic candidate.
"I would say I am by far the most experienced candidate in this race," he said. "I believe we will beat Joe Miller."
Miller's win doesn't fundamentally alter the nature of Alaska's politics, Republicans say, but it does signal a significant shift to the right.
ABC News' Amy Miller and Z. Byron Wolf contributed to this report.