Mayor Karen Bass advanced to a November runoff in the contest for Los Angeles mayor, leading the field in the city's primary as votes were counted. With about 65% of ballots tallied, Bass held roughly 35% of the vote, ahead of the second-placed finisher, the television personality Spencer Pratt, on about 30%.

Under the city's rules, a candidate who fails to win an outright majority in the primary faces the next-highest finisher in a runoff, setting up a head-to-head campaign through the autumn. Bass, seeking a second term, will now turn to consolidating support across a sprawling and diverse electorate.

The mayor's first term was dominated by the city's housing and homelessness crisis, public-safety concerns and the recovery from natural disasters, issues that are likely to define the runoff. Her allies pointed to her incumbency and citywide name recognition as advantages heading into the second round.

Pratt's strong showing reflected the unpredictable dynamics of a crowded primary in which several lesser-known candidates split the vote. His advance ensures a contest that will test whether the incumbent's record is enough to secure re-election in a city facing persistent challenges.

As in statewide races, Los Angeles counts a large number of mail ballots after election day, meaning the precise margins could shift in the days ahead even as the top two were effectively settled. Officials cautioned that final figures would take time to certify.

The runoff campaign now begins in earnest, with both candidates expected to sharpen their messages on the cost of living, street homelessness and the direction of the nation's second-largest city. Voters will deliver their verdict in November.