After elections officials spent more than 24 hours reviewing and counting absentee and provisional ballots, Republican newcomer Mike Pantelides was named winner of the Annapolis mayoral election Friday night.

Going into the count of provisional ballots Friday, Pantelides held onto a 50-vote lead over incumbent Democratic Mayor Josh Cohen. When the 65 provisional ballots were run through a scanner as an anxious crowd watched, 37 were for Pantelides and 28 were for Cohen, making Pantelides the winner by 59 votes out of nearly 8,000 cast. The totals: Pantelides, 3,934; Cohen 3,875.

Pantelides' supporters briefly cheered when elections officials read the tape of results from the ballot scanner about 6 p.m. before the rest of the races were announced.

"It feels fantastic. …This has been a long journey," said Pantelides, standing on a file cabinet that was turned on its side to serve as a makeshift podium and surrounded by relatives and well-wishers, including Anne Arundel County Executive Laura Neuman.

Cohen, who was not present during the marathon two days of tabulating absentee and provisional ballots, called Pantelides a short while later. He then drove to the city's old recreation center to congratulate Pantelides in person.

"You truly have a heart for public service, and I wish you the best," Cohen said before pinning an official city lapel pin on Pantelides' suit and shaking his hand.

Both sides had indicated that legal action was possible, and elections officials conducted their work carefully with that in mind. But once the counting wrapped Friday, legal action seemed less likely, as Cohen conceded to Pantelides.

"The voters have spoken. I respect the will of the voters," said Cohen, standing side by side with Pantelides before reporters. Cohen said he'd follow Pantelides' lead during the transition and offered his "full support."

The announcement of Pantelides as winner capped a long, exhausting week for elections officials, campaign supporters and the candidates.

At the end of Election Night on Tuesday, Pantelides was ahead by an 84-vote margin. The margin was whittled away as elections officials counted votes from a machine that had technical problems on Election Night and from absentee and provisional ballots.

The official elections canvass started at 9 a.m. Thursday and lasted until 4:35 a.m. Friday. Annapolis is known for long meetings — there have been two Annapolis city council meetings that dragged past 3 a.m. in recent months — but this process tested the stamina of the capital's officials and political activists.

By the end of the first round of the canvass, which included absentee ballots, Pantelides' margin had shrunk to 50 votes.

When counting resumed at midday Friday, elections officials focused on provisional ballots — the ones cast by voters on Election Day who were excluded from voting by machine for various reasons.

As they had done the day and night before, members of the Board of Canvassers sat at a folding table from lunchtime through dinnertime Friday, examining ballots with lawyers for both campaigns looking over their shoulders.

The three-member board needed a unanimous vote to disqualify ballots for reasons such as not being a registered city voter or not filling out the provisional application properly.

The new mayor and aldermen will be sworn into office in December.

Cohen said he had no regrets and loved being mayor of his hometown.

"I truly loved waking up and going to work every day serving my community," Cohen said.

Pantelides said his first order of business would be to set up a transition team.

"Going up against Josh Cohen was a huge challenge," said Pantelides, congratulating Cohen on running a clean race.