Kevin Faulconer, 46, a Republican, received 43.57% of the vote and David Alvarez, 33, a Democrat, received 25.60%, with 99% of votes counted.
Former Assemblyman Nathan Fletcher received 24.30% and former City Atty. Mike Aguirre 4.45%. Both are Democrats. Faulconer was the only Republican among major candidates in the race.
The runoff election is tentatively set for early February.
To avoid a runoff, Faulconer needed to earn 50% plus one vote.
Filner resigned Aug. 30 amid a flurry of sexual-harassment allegations. The 71-year-old Filner, the city's first Democratic mayor in two decades, later pleaded guilty to a felony and two misdemeanors involving the mistreatment of women.
Filner is set to be sentenced Dec. 9. Under a plea bargain, he will not spend any time behind bars but will be subjected to three months of home confinement.