Democratic gubernatorial candidate Tony Evers, left, and lieutenant governor candidate Mandela Barnes claim victory early Wednesday at the Orpheum Theater in Madison, Wis. Gov. Scott Walker narrowly lost his bid for a third term to Evers. (Mark Hoffman/Milwaukee Journal-Sentinel/AP)

Democrat Tony Evers proclaimed victory in the Wisconsin governor’s race early Wednesday in the wake of returns so close that Republican Gov. Scott Walker did not concede, with his camp gearing up for what it called “a long and drawn-out recount.”

Walker — a polarizing figure who already survived an acrimonious recall challenge in 2012 — was running for a rare third term against Evers, Wisconsin’s schools superintendent, in a race that was tight throughout, polls showed.

After a dramatic night of lead changes Tuesday, a sheaf of absentee ballots in Milwaukee finally appeared to put Evers over the top with 50 percent of the vote to Walker’s 48 percent early Wednesday.

An ecstatic Evers, 67, appeared onstage at the Orpheum Theater in Madison with his lieutenant governor, Mandela Barnes, at about 1:30 a.m. Wednesday to proclaim himself the winner — as his supporters chanted his name.

“Oh, my God!” Evers said. “Given all the results we have seen tonight, I feel confident in saying to you right now: My name is Tony Evers and I’m going to be the next governor of the state of Wisconsin!”

About an hour away in a suburban Milwaukee hotel ballroom, Walker’s lieutenant governor, Rebecca Kleefisch, told a restive — and bewildered crowd — that “the fight is not over . . . . We are preparing for the likelihood of a recount here in the state of Wisconsin.”

In his eight years as governor, Walker, 51, has rarely backed down from a fight. His decision early in his first tenure to eliminate most collective bargaining for public employees, known as Act 10, sparked days of protest at the capital and eventually a failed recall effort backed by big labor. Although Walker became a hero to conservatives, his presidential bid in 2015 failed early.

It was unclear early Wednesday if — or how — a recall process would actually take place. Evers seemed to have a comfortable margin of victory by the last unofficial tally of nearly 30,000. Ironically, Walker signed legislation last year that made it tougher to ask for a recount after Green Party candidate Jill Stein demanded a recount into President Trump’s 2016 win in the state. Candidates can now request recounts only if they lose by one percentage point or less in an election with at least 4,000 votes total.

Paul L. Decker, the Waukesha County board chairman, said that county clerks would have to review and certify the election results — a process known as “canvassing,” that could take up to a week — before Walker’s camp could request a recount.

Despite the uncertainty, the Democratic Governors Association sent out a statement congratulating Evers on his “huge win,” which it said “sent a clear message that Wisconsin is ready for a governor who’ll put schools, middle-class families and health care first.”