The fate of the Minneapolis mayor’s race hung in the balance Wednesday morning as city staff begin untangling the city’s ranked-choice votes. But the end was in sight.

“We will know the mayor results today,” said City Clerk Casey Carl.

City Council Member Jacob Frey commanded the lead among first-choice votes, but his position could change as tabulators factor voters’ second- and third-choice preferences.

“The thing we know right now is that the numbers don’t look great for me,” incumbent Mayor Betsy Hodges told supporters on Tuesday night. “The other thing we know is that we have ranked-choice voting and there is a lot of counting left to be done until the end.”

That counting involves rounds of elimination that nixes low-scoring candidates and reallocates their supporters’ second- and third-choice preferences. It begins with the mayor’s race on Wednesday at the city’s early voting center.

Frey also led among second-choice votes. But there remains a path to victory for other candidates, since the tabulation relies on each individual voters’ preferences. About 105,000 ballots were cast, Carl said.

Before counting can begin, staff must transcribe write-in votes and address ballots that skipped a ranking — such as listing only second- and third- choice preferences.

Carl could not say when, approximately, a mayoral result would be known on Wednesday.

Counters will also need to wade through a number of unresolved City Council races. The city only declared unofficial winners in six of the 13 wards.

One of the most significant tossups is Ward 4, in north Minneapolis, where City Council President Barb Johnson eked out a small lead over Phillipe Cunningham among first-choice votes. Cunningham outperformed Johnson among second-choice preferences, giving him a path to unseat the 19-year incumbent.

Two teams of tabulators will be working on the count. The mayor’s race will take first priority, followed by downtown’s Ward 3, south Minneapolis’ Ward 9 and north Minneapolis Ward 5.

“Once we get all the data cleaned and ready to go, we will be running the mayor and the first council ward at the same time,” Carl said. “One team will do the mayor, one team will do the council ward.”

The count will ultimately cover 16 races. Staff said the entire process will be complete by Friday.

Twitter: @StribRoper