San Francisco has a new sheriff in town. And she’s a woman – the first female sheriff to lead the city in the department’s 164-year history.

In a stunning upset, former chief deputy Sheriff Vicki Hennessy beat embattled Sheriff Ross Mirkarimi with 61 percent of the vote. She had never run for office before, noting that it was a "very unusual experience" for her, noting she had stepped out of her comfort zone, shaking hands and knocking on doors.

“It still hasn’t sunk in, though it’s a reality now,” Hennessy told NBC Bay Area at a victory party Tuesday night. “I have a vision of a sheriff’s department that is professional, well trained, humane, communicative and all kinds of adjectives abut what we’d like our public servants to be. And that it’s a department that serves the public. And that means all members of the public.”

Mirkarimi, who couldn’t be reached for comment on Tuesday night after the vote, has been the city’s top cop since 2011. Before that, he was sat on the Board of Supervisors for six years. But in 2012, he was charged in connection with bruising his wife’s arm and became the center of a political firestorm. It was then, that Hennessy stepped in as interim sheriff.

Mirkarimi ended up pleading guilty to one count of misdemeanor false imprisonment, but stayed in power because only seven supervisors voted to remove him, and the city charter requires nine. Because of the conviction however, he was stripped of his power to carry a gun.

In addition, this year Mirkarimi took much of the heat when Juan Francisco Lopez-Sanchez, an undocumented Mexican immigrant was released from the county jail instead of being turned over to immigration agents under the city’s sanctuary city policy.

Sanchez has plead not guilty to murdering Kate Steinle, who was walking along the Embarcadero in July, which sparked a national immigration debate, with Mirkarimi getting much of the blame. Last month, however the San Francisco supervisors reaffirmed the status of San Francisco as an immigrant sanctuary. They unanimously approved a resolution urging the sheriff not to participate in a detainer-notification system that asks jails to let Immigration Customs and Enforcement officials know when an inmate of interest is being released.

When asked what about releasing inmates if they have ICE holds on them, Hennessy responded that she and Mirkarimi have "different interpretations" of the city policy. “I think there is room for notification, not detention, but notification when we have someone in our custody that has a felony. I will work with the city attorney’s office and others.”

Hennessy joined the sheriff's department in 1975, her online biography states, and she became the youngest captain in California in 1983.

She added that one of her strengths is her even-keeled approach. “I’m a pretty steady person,” she said, “not someone who has a lot of drama.”

