The election was three weeks ago and up until late Monday, serious questions remained about who would become the next mayor of San Diego. Now it appears incumbent Mayor Dick Murphy (search) has survived an unexpectedly strong challenge.

Donna Frye (search), a 52-year-old surf shop owner and city councilwoman, decided to be a write-in candidate just five weeks before the election. Frye said that she was painted as a political novice by her opponent, but still managed to come within just more than 2,000 votes of Murphy.

She added that she is no novice — she has lived in San Diego since her childhood, has been involved in the political process for years and is a member of the city council.

"You would think that I just came off the beach with my hair wet and decided one day that I was going to run for mayor," she said of her opponent's characterizations of her.

Slightly more savvy than that, Frye won two separate lawsuits that opposed her write-in candidacy. One such case was brought by attorney John W. Howard, who argued that the city charter doesn't allow write-in candidates in the general election, and Frye did not participate in the primary so her votes don't count.

"The problem is that they voted for somebody that isn't eligible," Howard said. "I mean, we have to have some rules that govern our elections."

Last week, a San Diego Superior Court judge ruled that Howard's lawsuit was too little, too late. But Frye was unable to reap the victory from another lawsuit filed by the League of Women Voters (search) on her behalf. That suit argued that the county registrar must count every ballot that has Frye's name written on it, even if the optical scan bubble next to the name is not filled in.

Karen Getman, an attorney for the League of Women Voters of San Diego, estimated that 4,000 Frye votes would not be counted because the bubble was not filled in next to the write-in name.

County Registrar Sally McPherson (search) refused to count those ballots.

"We're just continuing to follow the law. The law states that you count a write-in vote if the mark is made in the space before right before the line and if the name is written in the write-in line," McPherson said.

Retired judge Eric Helgesen refused Monday to intervene in the dispute, saying he would be unlikely to grant such a request or to block the registrar's office from certifying the results.

Helgesen did not issue a final ruling, and it was not immediately clear when he would do so. All 124 judges on the San Diego Superior Court bench were recused from the case last week because Murphy was a San Diego judge for 15 years before he was elected mayor in 2000.

The campaign had been a rematch of the 2000 contest between Murphy and San Diego County Supervisor Ron Roberts, both Republicans, until Frye jumped in. She said that she wanted to stop the backroom deal-making and revamp the city's finances, which were wracked by scandal and followed by an investigation by the Securities and Exchange Commission (search) and Justice Department.

Murphy declared victory Friday when the final tally by the Registrar of Voters showed him with 2,205 more votes than Frye. The oath of office is scheduled for Dec. 9. Frye said she is uncertain about whether to appeal her case.

Click in the box near the top of the story to watch a report by FOX News' Anita Vogel.