Oakland Mayor Libby Schaaf was headed for a re-election victory early Wednesday morning after a mostly uneventful, low-key campaign.

With 100 percent of precincts reporting, Schaaf had 56 percent of the vote. Her nearest competitor, Cat Brooks, had 23 percent.

Schaaf becomes the city’s first mayor to clinch a second term since Jerry Brown’s time in the office.

“I’m really humbled,” Schaaf told The Chronicle. “Oakland has not re-elected a mayor for 16 years. We are a feisty city. We love change. We don’t always like people in power. So, to see such a strong showing to re-elect a city mayor is really humbling.”

Takeaway: The campaign was a referendum on whether Schaaf has done enough to alleviate the homeless crisis and build and retain affordable housing — forces that have pushed longtime residents out of the city or onto the streets.

Background: Schaaf, 52, served one term on the City Council before her 2014 mayoral victory. She famously sparred with President Trump and his administration this year after she released a public warning about an impending immigration enforcement operation in Northern California.

Schaaf’s support of sanctuary city policies, designed to shield immigrants from deportation, won her praise on the left. Nationally, Schaaf said, she is viewed as “one of the most dangerous radicals around.”

Congressional results on Tuesday had Democrats regaining control of the House, and Schaaf said she intends to continue to push back against the Trump administration over the next four years.

“Tonight’s national results were encouraging but not quite as strong as a lot of us had hoped,” she said. “I think it does leave us at the local level to be the champions, to push the limits, to experiment, to be where innovation happens.”

Despite her resounding victory, many in Oakland consider Schaaf too centrist and supportive of development, big business and tech industries reshaping the city. Others complain her administration hasn’t sufficiently responded to illegal dumping, potholes and vandalism. And violent crime, which has taken a sharp dip in recent years, continues to plague poor neighborhoods.

Her main competitors — nine ran against her — were Brooks, a nonprofit leader and activist, and Pamela Price, a civil rights attorney who was defeated in the June Alameda County district attorney’s race.

Schaaf’s first term as mayor of Oakland was marked by episodes of tragedy and scandal — among them the Ghost Ship fire in 2016 that killed 36 people and sexual misconduct within the Police Department.

Under ranked-choice voting, Oakland voters select up to three preferred candidates. If no one were to receive a majority of votes among No. 1 picks, then the candidate who received the fewest first-choice votes is taken out of the running, and that person’s votes are redistributed to the No. 2 choices on those ballots.

Schaaf’s ability to lock up well over 50 percent of the vote helped her avoid that scenario.

Kimberly Veklerov is a San Francisco Chronicle staff writer. Email: kveklerov@sfchronicle.com Twitter: @kveklerov