Former NBA All-Star Kevin Johnson survived his first political test, forcing a runoff election for mayor against the two-term incumbent in California's capital.

Neither candidate secured enough votes to win outright Tuesday in a race that drew national attention and claims of dirty politics after sexual misconduct accusations surfaced against the challenger.

Johnson won 47 percent of the vote, compared with Heather Fargo's 40 percent, while five lesser-known challengers split the rest of the vote. The candidates needed more than 50 percent to win the contest outright.

Johnson was ebullient Tuesday night in a brief address to energized supporters at an inner-city art gallery he helped develop.

"They said we didn't have enough experience. They said we mismanaged the campaign. They said all the negative stuff would stick," he said. "The prognosticators were wrong."

In contrast, the mood at Fargo's Election Night party was subdued, and not just because she failed to secure a third term.

Her original party at a downtown Mexican restaurant had to be evacuated after a 30-foot tree branch collapsed on supporters gathered on the patio, sending one woman to the hospital.

Fargo called it a "freak accident" and moved the party to her campaign headquarters.

She said she was preparing to start fundraising anew after being outspent three-to-one by the millionaire former ballplayer who drew stars such as Magic Johnson to his campaign events.

"I'll be focused on trying to remind people what Sacramento is like now and what it was like before I became mayor," eight years ago, Fargo said.

Johnson, who spent 12 seasons as a point guard with the Phoenix Suns, returned to Sacramento after his playing days were over to reform his old high school and rebuild his struggling Oak Park neighborhood. He then set his sights on politics, believing his hometown was failing to reach its potential.

His campaign to unseat Fargo was short but furious, featuring more mudslinging than substantive discussions about the future of the city of 475,000. Voter turnout was projected to be just 20 percent.

Johnson, 42, has been dogged by old sexual abuse allegations since he announced his candidacy in March. He also has faced complaints about his nonprofit development agency and criticism from gay activists after saying he doesn't support same-sex marriages.

Shortly after he entered the race, challengers made public two previous police investigations into whether he behaved inappropriately with teenage girls.

Phoenix police investigated an allegation that Johnson, then 29, molested a 16-year-old girl in 1995. No charges were filed, but The Sacramento Bee obtained a draft legal document that showed Johnson paid the girl $230,000 in a confidential settlement.

In 2007, a student at a school Johnson helped develop accused him of touching her inappropriately. Police investigated and found the claims to be without merit. As in Phoenix, no charges were filed.

Johnson emphasizes that he was not charged in either case and has cited confidentiality in declining to address the accusations in detail. He said he knocked on 23,000 doors in his grass roots-campaign, and voters have only rarely brought up the allegations.

Fargo, 55, a former community activist who ran largely unchallenged in 2004, also has had her image tarnished during the campaign.

She refused to denounce a negative union mailer that attacked Johnson's character and last week asked the city's police chief to reopen the investigation into the Sacramento girl's allegation. The police chief declined.

Fargo also was put on the defensive when the Bee reported she had taken numerous international trips to environmental conferences of dubious benefit to the city.