BUFFALO, N.Y. (WIVB) – After a mayoral race that featured a stunning primary upset, the most ambitious write-in campaign in recent memory, legal challenges to the elections calendar and national political figures lending their support, the results are in – and they appear favorable for incumbent mayor Byron Brown.

Brown, campaigning from an unprecedented fifth term as a write-in candidate after losing the Democratic primary, appeared to have the edge Tuesday night as the number of write-in votes cast in the election outnumbered the votes cast for Democratic nominee India Walton by more than 10,000.

But as good as things look for Brown, it will be weeks before the Board of Elections will be able confirm Election Night impressions. Absentee votes can arrive through Nov. 9 as long as they were postmarked by Election Day and the Board of Elections won’t begin to examine the write-in votes until Nov. 17, pursuant to state law. The absolute latest deadline to certify the election is Nov. 27.

Brown appeared to declare victory at his headquarters Tuesday night – “The people chose four more years,” he said (full speech below) – but Walton was not ready to give up just yet.

“This is definitely not a concession speech,” Walton said, adding that it’s still unclear who “write-in” is.

“But what I can guarantee you is that I will continue to fight for everyday Buffalonians who are struggling to make ends meet and live a quality life,” Walton said. “And I am going to continue working … to build a safe and healthy Buffalo.”

The final, unofficial vote count reported by the Board of Election has “Write-In” leading Walton 34,273 to 23,986 (58.8% to 41.2%), though that does not mean Brown received exactly that many votes. Not every write-in vote will go for Brown – fringe candidates Benjamin Carlisle and Jaz Miles also ran write-in campaigns – and some voters who intended to vote for Brown may have done so incorrectly.

Additionally, Erie County Elections Commissioner Ralph Mohr told News 4 there are about 2,400 “undervotes” in the mayoral race, which are ballots submitted without having a bubble filled for anyone in that column. Since write-in votes do not need to have the bubble filled in to count, there could be additional write-in votes coming that are not reflected in the unofficial numbers.

Walton, a proud Democratic Socialist, was endorsed by the Democratic Party after winning the primary and also garnered support from national political figures like Bernie Sanders and Alexandria Ocasio-Cortez. Brown frequently attacked Walton’s views as radical and gained the support of Republicans in the process.

Brown made reference to Walton’s views in his speech: “Today’s election was not just a referendum on the City of Buffalo. It was a referendum on the future of our democracy,” he said.

If Brown is indeed confirmed the winner, he would be the first mayor in city history to serve five terms. Walton was seeking to become the first female mayor in Buffalo history, and the first socialist mayor of a major American city since 1960.

“I never gave up on our great city,” Brown said, “because we’re from Buffalo and we never quit.”

Live updates

Updates in the Buffalo mayoral race between Democratic nominee India Walton and four-term incumbent Byron Brown will posted here. More coverage on this race can be found here.

10:40 p.m.: Brown: “At the very beginning, they said we couldn’t win; it was impossible to win as a write-in. But you know, you can’t ever count a Buffalonian out.”

10:36 p.m.: With 96% of precincts reporting, Write-In leads India Walton, 59.1%-40.9%.

10:33 p.m.: Byron Brown now talking at the same time as Walton. “This is a remarkable journey we have been on. Your faith and trust has sustained me,” Brown says.

10:30 p.m.: India Walton is speaking now and says all the write-in votes need to be counted.

10:10 p.m.: With 87% of precincts reporting, Write-In leads India Walton, 59.7%-40.4%. Again, we don’t know that all these votes are for Brown, or that they will all count, but it is looking good for the mayor.

10 p.m.: With 53% of precincts reporting, Write-In leads India Walton, 61.2%-38.8%.

9:15 p.m.: Early voting results show write-in votes outnumber votes for India Walton nearly 2-to-1. We can’t be sure every vote is for Brown, but early voting was Write-In 10,015, India Walton 5,278.

9 p.m.: Polls have now closed. The early voting results are expected to come in soon.