With sexual harassment allegations dogging the incumbent, the city looks set to get its first-ever elected woman sheriff.

Updated 11:35 p.m., clarification appended

Philadelphia voters appear to have delivered a stunning upset to Sheriff Jewell Williams in Tuesday’s primary election.

According to unofficial returns, Rochelle Bilal has secured a decisive percent of the vote in the four-way Democratic race. With no Republican challenger in the November election, she is on the road to becoming the first elected black female sheriff — and first elected woman, period — in the department’s 181-year history. (Barbara Deeley was appointed acting sheriff in 2011 following former Sheriff John Green’s ouster. She declined to run the in the subsequent election.)

“When I went around this city, nobody knew what the Sheriff’s Office was,” Bilal said. “Half of them didn’t even know its name. We need to be able to change that.”

As of 10:09 p.m., Bilal held 40 percent of the vote with 91 percent of precincts reporting, far above Williams’ 27 percent. It is unclear if Williams has conceded, as he refused to share his election night location with reporters.

First elected in 2011, Williams’ re-election bid for his third term was dogged by three sexual harassment allegations made by former female employees. Two of those cases been settled at the taxpayer’s expense; one is still pending in court. Williams has vehemently denied the allegations.

In Bilal — president of the Guardian Civic League and secretary of the Philadelphia chapter of the NAACP — the often-unseen row office would get a new start.

Bilal campaigned on promises to restore integrity to the department that has been beleaguered by scandals and mismanagement for decades. Former Sheriff John Green recently pleaded guilty to accepting bribes during his decades-long tenure in office.

Specifically, Bilal, a former police officer, has concentrated her campaign on the office’s real estate wing, calling to reduce the number of properties that go to sheriff’s sale and instead help homeowners keep their properties.

Despite losing the Democratic City Committee’s influential endorsement, individual ward leaders stuck by Williams. Over a dozen ballots obtained by Billy Penn on Election Day carried endorsements for longtime pol. But Bilal picked up support from several high-turnout wards and several progressive groups, as well as an endorsement from District Attorney Larry Krasner.

Bilal is not without blemishes on her record as a public servant. While working as a Philadelphia police officer in 2013, she took a second job as a public safety director for a Delaware County borough. The Philadelphia Police Department department confirmed to WHYY in December that an internal investigation found Bilal had violated the department’s policy prohibiting dual employment at publicly funded agencies. Bilal resigned from the PPD before making that decision.

Former deputy sheriff Malika Rahman is slated to finish third behind Williams in the Democratic primary with 25 percent of the vote, followed by former deputy sheriff Larry King Sr. at 6 percent, according to unofficial returns.

No Republican is running in the race, leaving Bilal unopposed in the November general election. That’s an all-but-guaranteed victory for the incoming official, barring a long-shot independent or write-in campaign.

This is a breaking news story and will be updated with more details.