Election returns on Tuesday showed Lisa Murkowski with a good chance to become only the second candidate to run a successful write-in campaign for the U.S. Senate in the nation's history. But Joe Miller wasn't giving up, and his campaign was getting ready for a possible court fight.

With 432 of 438 precincts reporting, 41 percent of the voters had filled in the write-in oval on their ballot. Most of those likely wrote in incumbent Sen. Murkowski, who spent over $1 million telling voters to "fill it in, write in" after she lost to Miller in the Aug. 24 Republican primary.

But it won't be clear for weeks at least how many of the voters wrote in Murkowski's name, and how many did it properly enough to be counted. Republican nominee Miller, who ran on a tea party platform with the backing of former Gov. Sarah Palin, was pulling in 34 percent of the vote. Miller was followed by Democratic nominee Scott McAdams, who had about 24 percent of the vote.

No one has been elected to the U.S. Senate as a write-in candidate since Strom Thurmond in 1954. That's also the last time the Giants, known as the New York Giants in those days, won the World Series. The now-San Francisco Giants took the title Monday night. But it's going to be a long wait to see if Murkowski was victorious as well.

The Division of Elections has sent out more than 31,200 absentee ballots. The first batch of those, as well as questioned ballots, will be counted Nov. 9. Some absentee ballots mailed back from overseas won't be counted until Nov. 17.

Alaska's computerized voting system shows how many voters filled in the oval for a write-in candidate but not the actual name the voter wrote in. The write-in ballots are only opened to look at the name if there are more of them than votes for the leading candidate, or if the number of write-in ballots is within .5 percent of the frontrunner.

That count would begin Nov. 18 and be expected to last three days. The campaigns have been getting ready for the court challenges over "voter intent" that would be expected to follow. Minor misspellings are probably OK but simply writing "Lisa M,"; for example, could be a problem.

If Murkowski manages to win as a write-in, political operatives and academics will be studying it for years. She distributed rubber bracelets with her name on it, t-shirts, even temporary tattoos. Murkowski, a well-known incumbent with a lot of money running in a small state, was also in a good position to try to pull it off.

Murkowski had $1 million left over from the Republican primary, where Miller beat her in one of the most shocking upsets in Alaska's political history. She also received a boost from Alaska Native Corporations that spent over $1.2 million on her behalf.

Murkowski walked into her campaign party at the Dena'ina Center just before 9 p.m. on Tuesday. She first hugged her father, former senator and Alaska Gov. Frank Murkowksi, then one of her sons. She could barely get through the crowd as supporter after supporter stopped to hug her and say hello.

A few minutes after she entered, the crowd of roughly 300 people erupted into wild cheers - some people even jumped up and down -- as the campaign flashed up the first returns.

Murkowski, who had to be pulled aside in a quiet room for a quick interview, described walking into her campaign party as "surreal." Each time the campaign updated its numbers on a giant screen visible to the whole party, her supporters let out cheers.

"There's so much love and excitement, support and hugs," she said. Murkowski argued on the campaign trail that she would keep the state's seniority in Washington and invoked the legacy of Ted Stevens, her Senate mentor who died in a plane crash this summer.

Murkowski walked into the election central at the Egan Convention and Civic Center about 11:30 p.m., to chants of "Six more years" and "We made history" from her supporters.

Cab dispatcher Kathy Aloia, 45, said she voted for Murkowski because she likes her, and thinks she's done a good job representing Alaska in Washington. Aloia said she once resented how Murkowski was first appointed to the Senate by her father, but she feels she long ago proved herself.

"I filled in the oval and wrote in her name, just like they said," said Aloia, who voted at East High in Anchorage.

Miller wouldn't talk to reporters on election night. "We're a little disappointed, straight up," Miller campaign manager Robert Campbell said. "You can't be happy with five points down, and I think it would be silly for us to say otherwise."

Campbell saw no scenario where Miller would concede before the hand count. Lawyers are on their way to Alaska to help Miller battle over the numbers, he said.

"We have several teams in place that will hopefully be on the ground here shortly and we'll start the process," he said.

The National Republican Senatorial Committee will assist in the effort, Campbell said.

Miller supporters crowded the Snow Goose restaurant downtown for a party, where live country music and a mood of nervous expectation turned to quiet disappointment as the first results arrived.

After telling supporters they helped work to secure their children's futures, Miller and his family disappeared back stage for more than an hour after the numbers appeared. He eventually emerged for a quick speech to the crowd.

"It doesn't look like we're going to have a clear result tonight. We've still got half of the districts yet to come," he said

Murkowski benefited from a rocky campaign by Republican nominee Miller. At one point Miller refused to answer any questions about his past, and his private security team handcuffed a journalist who pressed him for answers after a town hall meeting.

His message was that federal spending is completely out of control and that it's unconstitutional for the federal government to be providing programs like unemployment benefits and to require a minimum wage. Miller said what he wanted was for the states to have the power instead.

Miller supporters emphasized his stance against abortion, even in the case of rape and incest. Maria Charette, 55, and her daughter, Rhea Charette, 22, both cast votes for Miller in Anchorage. They said Miller's position on abortion made him the only candidate they would support.

"Life, abortion is where it gets me,"; said Rhea Charette, who's a teacher.

Robert Carnahan, an independent voter, said he liked both Murkowski and Miller, but decided to go with Miller."Because he's for a little less government," said Carnahan, a commercial fisherman.

Democrat McAdams on Tuesday night urged his supporters "to take pause to reflect on how far we've come" briefly retelling his rise from the unknown Sitka mayor who found himself the Senate candidate mainly because his city hosted the state party convention. McAdams told his supporters that they have started a movement and should continue the momentum of it.

"What we have started here, whether we continue it on in Washington, D.C., or whether we continue it on here in the State of Alaska, or whether we continue it on in both places simultaneously. Let's acknowledge, let's recognize, that we can stand up and be proud, that we can stand up tall," McAdams said.

Murkowski and McAdams battled hard over the anti-Miller vote. Jennifer Smith, 26, said she voted for Democrat McAdams in part because she liked his folksy, down-home campaign commercials. He appears laid back and relaxed, Smith said, and she was left with the impression that what you see is what you get with McAdams.

McAdams urged Democrats to "vote your values and not your fears," rather than write in Murkowski out of speculation that she had the better chance to beat Miller. McAdams called for federal spending on Alaska projects and supported abortion rights on the campaign trail. McAdams advocated for oil drilling in the Arctic National Wildlife Refuge and offshore, but wanted the federal royalties to go for renewable energy.

Murkowski said McAdams, the former mayor of Sitka, was too inexperienced for the job. She called Miller an extremist with dangerous views. She also called Miller a hypocrite when it came out that his family of eight children had benefited from health insurance programs for lower-income people that are funded by federal dollars.

Miller had declared such programs unconstitutional on a federal level. Independent voter Gudith Dolan, 40, said that was one reason she voted for Murkowski over Miller. "He took advantage of all kinds of programs to help his family out and now he wants to do away with them."

Miller was the apparent front runner for most of the weeks but polls in the closing days suggested it was anyone's race. Documents released in late October through a lawsuit by media organizations showed Miller first lied when first caught using his co-workers' computers at the Fairbanks North Star Borough for politics in 2008.

Melodee Smith, a Republican who doesn't necessarily vote party lines, said she didn't like that Miller lied. She wrote in Murkowski. Sarah Palin's endorsement of Miller also turned her off, she said. "Whoever she supports, I tend to back away from," said Smith, a nurse who voted in South Anchorage.

Miller's message to Alaskans was that "I am one of you, warts and all." He made his military experience a centerpiece of his campaign, frequently mentioning that he graduated from West Point and was awarded a Bronze Star in the first Gulf War.

Palin headlined an Anchorage rally for Miller in the final days of the campaign, which included video tributes from national conservative stars like former Arkansas Gov. Mike Huckabee, Rep. Michelle Bachman and Sen. Jim DeMint.

Palin took the stage at that Dena'ina Center event last week, spoke of Miller's resume, and asked the crowd "are we even fit to tie his combat boots?"

Joe Miller addresses his supporters from his election party this evening (Video by Kyle Hopkins)