1117murkSen. Lisa Murkowski on Wednesday became the first Senate candidate in more than 50 years to win a write-in campaign, emerging victorious over her Tea Party rival following a painstaking, weeklong count of hand-written votes.

The victory completes a remarkable comeback for the Republican after her loss in the GOP primary to Joe Miller.

Her victory became clear when Alaska election officials confirmed they had only about 700 votes left to count, putting Murkowski in safe territory to win reelection.

Murkowski has a lead of about 10,000 votes, a total that includes 8,153 ballots in which Miller observers challenged over things like misspellings, extra words, or legibility issues.

It was not immediately clear how Miller will proceed. He and his advisers have vowed to take legal action over what they contend is an unfair tally in Murkowski’s favor, but Miller has maintained he’ll stop fighting if the math doesn’t work in his favor.

Miller’s complaint is that the determination of votes was subjective and not strictly in line with election law. Because it was a process unlike any Alaska had seen, the rules for conducting the election were written as the race went on.

Miller lost despite support from Sarah Palin, the former Alaska governor and 2008 GOP vice presidential candidate who has long had a tense relationship with the Murkowski family.

Murkowski will return to Washington in an odd position in the Republican Party. The National Republican Senatorial Committee threw its support and cash behind Miller, opting to back the candidate who received the GOP nomination. And she has never had many friends within the Tea Party movement, putting her at odds with that faction of the party as well.

Murkowski says she will approach issues as they come to her, and vowed to do what’s best for Alaskans. She opposed a Republican-supported moratorium on earmark requests, a hot issue on Capitol Hill following the Tea Party surge in the midterm election.

The Associated Press contributed to this report.