Minneapolis Mayor Jacob Frey was reelected to a second term, beating seventeen candidates in a race that focused on calls for changes to policing and racial justice.

Many of his opponents took issue with the way Frey has handled changes to the police department since one of its officers killed George Floyd last year. Frey, a Democrat, risked his political future and drew the ire of the city’s most liberal voices by opposing a ballot question asking voters to eliminate the police department.

Voters soundly defeated the policing ballot on Tuesday but Frey had to wait till Wednesday to know about his own fate. After the first count, Frey had 43% of the vote, which was more than double the support of his closest challengers but short of the more than 50% needed to win outright under the city’s ranked-choice voting system.

Frey was announced the winner by the election officials after the allocation of voters’ second and third-place choices when their first choices were eliminated. The city said Frey won with 49.1%, or 70,669 votes, to runner-up Kate Knuth’s 38.2%, or 55,007 votes.

Only a handful of candidates were thought to be serious threats to Frey, with two — Knuth and Sheila Nezhad — teaming up on a strategy that urged voters to leave Frey off their ballots entirely. The pair had the backing of US Representative llhan Omar.

Frey, a Democrat in a liberal-dominated city, faced sharp pressure from competitors on his left flank. Seventeen candidates had entered the race for mayor, including many who took issue with the way Frey has handled changes to the police department since George Floyd was killed by a Minneapolis officer last year. Frey positioned himself as an opponent of an effort to eliminate the police department and of the most vocal liberals who were seeking a symbolic victory in Floyd’s city.

Voters soundly defeated the proposal to replace the department, with about 56% opposed. Two council members who backed elimination were ousted by challengers, and two others were in close races.

Under the ranked-choice system, candidates with no chance to win after the first round of counting are eliminated. A voter who backed such an unsuccessful candidate would then have his or her second choice tabulated, presuming that candidate remained in the race. The process is repeated until a candidate is declared the winner.

(With AP inputs)