Minneapolis Mayor Jacob Frey overcame a full-scale attack from his left — including the late-campaign efforts of Fifth District U.S. Rep. Ilhan Omar and her social media legions — to win re-election on Wednesday.

That outcome was far from certain when voting began this fall. The economic fallout from the pandemic, the brutal murder of a Black man at the hands of a Minneapolis cop and a wave of violent crime made this ranked-choice election especially unpredictable.

When it endorsed Frey last month, the Star Tribune Editorial Board pointed to one of the most politically challenging days in his first term, when protesters gathered at the mayor's home not long after George Floyd's death to demand that he defund the Police Department. He refused to be cowed, showing common sense and a backbone as he stood up to the angry crowd.

The 2021 campaign became even more consequential when three critical charter questions were added to the ballot — one on mayoral authority, a second on policing and public safety, and a third on rent control.

Frey's top challengers, Kate Knuth and Sheila Nezhad, ran to the left of the incumbent, who can best be described as a moderate progressive. Knuth and Nezhad countered Frey by backing the effort to replace the Police Department, opposing more mayoral control over city government, and wholeheartedly embracing rent control.

They urged voters not to rank Frey as even a second or third choice for mayor. And in mid-October the popular and polarizing Omar joined in, endorsing both Knuth and Nezhad (she did not rank them) and also asking voters "not to rank our current mayor."

Omar also backed the public safety amendment, which voters resoundingly defeated on Tuesday. No doubt she hoped to claim postelection credit for dismantling the Police Department and ousting Frey, but she and far-left Democrats in the Minnesota Legislature went 0-2.

None of this is to suggest Frey did not deserve mostly middling reviews for his first-term performance. At times he was frustratingly passive, unable to rally City Council and state legislative support for critical initiatives, including public safety and police reform.

He'll enter a second term bolstered by the passage of what became known as the "strong-mayor amendment" — a much-needed change to a governance structure that gave the City Council too much control.

Our advice to Frey is to articulate a clear vision for public safety, police reform and housing. He'll need to work with Chief Medaria Arradondo to address violent crime and rebuild the emaciated Police Department with hundreds of new officers who can be part of a culture change at MPD.

The more traditional City Hall model will give Frey new ways to influence the council. That power will come with responsibility to set a smart and pragmatic agenda as the city slowly recovers from the pandemic. He'll need allies on the council and at the State Capitol. And Frey could have a council more inclined to work with him.

At least five of the winners can be counted on to try to repair some of the missteps of the current council majority. Incumbents Lisa Goodman in the Seventh Ward and Linea Palmisano in the 13th Ward both easily won re-election. They deserved to return to office. Both have been reliable voices of reason, and both have stood up to colleagues who had difficulty making the transition from advocacy to policymaking and who often did too much micromanaging.

They'll be joined in January by smart, like-minded newcomers who defeated incumbents who supported dismantling MPD. In the Third Ward, Michael Rainville prevailed over incumbent Steve Fletcher. Fourth Ward incumbent Phillipe Cunningham lost to LaTrisha Vetaw. In the 11th Ward, challenger Emily Koski defeated incumbent Jeremy Schroeder. Rainville, Vetaw and Koski opposed the public safety amendment.

Those five more moderate voices will need allies to build a majority on the 13-member council. They may not get much help from newcomers Elliott Payne in the First Ward, Robin Wonsley Worlobah in the Second or incumbent Jeremiah Ellison in the Fifth. All three supported the public safety amendment and defeated more centrist opponents in tight races. Those three, along with victorious newcomers Jason Chavez in the Ninth Ward and Aisha Chughtai in the 10th Ward, were not endorsed by the Editorial Board.

Incumbents Jamal Osman in the Sixth Ward, Andrea Jenkins in the Eighth and Andrew Johnson in the 12th also supported the public safety charter change, but they've stood out as pragmatic, nuanced thinkers on a range of issues and were recommended by the Editorial Board.

Opinion editor's note: A portion of this editorial is adapted from Wednesday's edition of the daily Star Tribune Opinion e-mail newsletter. To sign up for the newsletter, which highlights our most-read content, go to bit.ly/OpinionNewsletter.