OAKLAND — Even before December’s horrific Ghost Ship fire, 2016 had been a trying year for Oakland and its mayor, Libby Schaaf. An affordable housing crisis. A police department roiled by a teen sexual abuse scandal. A revolving door of police chiefs. The Oakland Raiders packing for Las Vegas.

Related Articles Oakland Mayor Libby Schaaf shoots for the moon in speech

Oakland police sex scandal: Interim chief Ben Fairow out after five days

Peele: Schaaf trying to stop embarassing stories Then, the deadliest fire in the city’s history killed 36 people attending a dance party Dec. 2, and the city stood still. Four days after the fire, at a vigil at Lake Merritt, frustration reached a personal level as those gathered — many from the arts community close to Schaaf’s heart — expressed their anger directly at the mayor. Boos rained down as she stood at a podium.

The moment illustrated the delicate, nuanced world of running this East Bay city, a place that always seems to have its share of highs and lows. But whatever positive developments 2016 brought for the city were quickly overshadowed by challenges and crises that culminated with the Ghost Ship tragedy. The question now is, are those lows enough to tarnish Schaaf’s budding legacy?

“No matter what I have personally done as mayor, I am the face of government,” Schaaf said Friday. “I often feel the anger and disappointment that people have in government failures, but I also have the great pleasure of being the face of Oakland, an incredible city in an incredible moment of time.”

Schaaf, 51, is seen as a rising star by political observers. First elected to the City Council in 2010, the former lawyer previously worked as an aide to Gov. Jerry Brown when he was mayor of Oakland. In December, the New York Times named her as part of the next class of the state’s political leaders, one who “has drawn a lot of interest from Democrats since Election Day.”

Her tenure as mayor has seen a boom in development and tech companies coming to Oakland, including Uber, which plans to open its new headquarters on Broadway in the bustling Uptown nightclub and restaurant district. She’s been praised for embracing the city’s artists and raising funds for the arts community. She helped launch the Oakland Promise, a partnership with the school district, companies and nonprofits that next year will begin to create savings accounts for children with the promise they can go to college.

But there have been plenty of downs. Raiders owner Mark Davis announced in April that he planned to build a stadium in Las Vegas, opening the possibility that the team could leave during Schaaf’s tenure. Less than a month later, a headline-grabbing scandal broke involving Bay Area law enforcement officers who allegedly had sex or gave confidential information to the teenage daughter of an Oakland police dispatcher. Charges were eventually filed against five Oakland officers.

The scandal led to the now-infamous week in which the city had three different chiefs of police, ultimately leaving the force without a leader as the year winds down, and as the department remains under the control of a federal monitor. The chief’s opening is not the only one at this critical time in Oakland. There are no permanent department heads in the building and planning, and information technology divisions.

“All the institutional knowledge is leaving,” said Greg McConnell, executive director of the Jobs and Housing Coalition. “There is a growing sense of disappointment in the administration and the city. I hear people say it’s broken. It can be fixed. You can resurrect it.”

The honeymoon phase for an Oakland mayor can be short, as it was for Schaaf’s predecessor, Jean Quan. Quan’s problems began early in her first term, with relentless criticism for her handling of the Occupy Oakland protests by first allowing people to camp in front of City Hall and then calling for police to force the campers out. Quan lost re-election in 2014 to Schaaf.

“It got ugly fast. I would say Jean’s honeymoon period was much shorter,” said Joe Tuman, a San Francisco State University professor of political and legal communications and 2014 mayoral opponent of Quan and Schaaf. “I think it was a tragedy for her. In some ways, she was still in a learning curve, but you get judged on how you handle a crisis.”

For Schaaf, that crisis is the Ghost Ship fire, Tuman said.

Reading this on your phone? Stay up to date on East Bay news with our new, free mobile app. Get it from the Apple app store or the Google Play store.

Schaaf appeared to escape serious criticism over the police department’s handling of the sex scandal, and her refusal to spend taxpayer money on a new sports stadium has mainly irked only Raiders fans. But the inferno that quickly consumed an unpermitted Fruitvale warehouse is another matter.

The fire revealed that the building, which is zoned for commercial use, was home to some 20 people, but it had not been inspected by the fire department. Code enforcement officers called to the warehouse for various complaints never went inside.

The mayor has faced the public and the victims’ families, pledging a thorough investigation and no scapegoating of city employees in the wake of the fire. But two lawsuits naming the city have already been filed by victims’ families, with more likely to come. As Schaaf pointed out, as mayor she is the face of the city.

“I don’t think a mayor is a superhuman,” said civil rights attorney Dan Siegel, who ran against Schaaf in 2014 and was an adviser to Quan. “I don’t expect 100 percent success, but I do believe that the mayor should have an understanding of what’s going on in a city where the problems are, and from there she has to prioritize about how she spends her time.”

The Ghost Ship fire has caused another dilemma for the mayor, as her administration finds itself balancing the need for public safety in the city’s live-work spaces in a way that does not end in crackdowns and evictions of the artists in whom she takes so much pride.

Matt Hummel, a member of the Oakland Warehouse Coalition working to protect residents, said he is hopeful Schaaf’s administration will work with the coalition to help them through this rough patch.

“She said a lot of the right things,” said Hummel. “I think everyone got really affected by this personally and emotionally, and I don’t think she’s independent of that. It’s been a trauma across the board.”

Schaaf remains optimistic: The city has more than 2,000 housing units under construction, 1,100 new companies have come to town, and her $600 million infrastructure bond to fix streets and libraries and create affordable housing won a resounding 82 percent at the polls in November.

“While I work hard everyday to have an immediate impact, I’m also trying to make systemic changes to the city government that may not be felt until long after I’m gone,” the mayor said. “Then I try to balance that work with the crises and opportunities that come my way. Certainly, 2016 felt like it had more than its fair share of those.”