Wellington's former mayor Justin Lester has had his bid for an election recount declined.
Mr Lester applied to Wellington District Court applied for a recount after a final count of the local election votes showed Mayor Andy Foster won the mayoralty by 62 votes, a lower margin than the 503-vote lead in the preliminary count.
He gained 27,364 votes to Justin Lester's 27,302 votes.
Mr Lester's lawyer Graeme Edgeler said the decision by the court was "proper" and the argument that a recount would yield enough votes for Mr Lester to change the outcome was a difficult one to make.
"It was always a difficult argument to advance, but it was justified and worth making," he said.
Mr Lester's application was made on the basis that the result was exceptionally close - less than 0.11 percent of the valid votes cast in the election.
A report from the Electoral Office considered by Judge Kevin Kelly outlined that even if excluded votes were counted, the outcome would not change.
Mr Lester said he respected the decision.
"There's never been a manual recount of an STV election, votes are counted by a computer, they're not always right. We had Nigel Roberts who said in another modern democracy you'd have an automatic recount, so that's a shame but it is what it is.
"I've spent a lot of time studying law myself and you respect that, that's full and final. As far as I'm concerned, that matter's at an end.
"You've got to move on when you take a defeat."
He said he was looking forward to spending more time with his family and working with other Wellington businesses and charities.
"I've got my first meeting this weekend with my wife around this affordable housing charity, so we're scoping out some properties for that. I'm looking forward to doing new things."
He was not considering pursuing any central government positions, he said.
"I've always heard these rumours being bandied about - never from me - that's not my ambition."
He said local government voting systems needed to change.
"We had people queuing up after 12 o'clock to cast their votes, we had people that sent their votes on the Tuesday but they arrived after Saturday and those votes weren't counted.
"There are a whole raft of things that need to change in local government, postal elections are for the past."
He also thanked the city for his tenure at the council.
"I came into council a 32-year-old community member and I stood for council because I thought we deserved better, I thought we wanted some effective representation.
"I've been a deputy mayor and a mayor, it's been the best nine years of my career, I've thoroughly enjoyed it.
"I do have to say I look forward to having my evenings to myself... I also won't miss some of the emails that you get - the crank ones - people wanting their potholes fixed or their chipseal laid in a different way, but look it's been a wonderful job and I've incredibly enjoyed the privilege of serving Wellington."
Mr Lester wished the city's new mayor well.
"Andy's had 27 years on council - he's got the experience - the difficulty will be getting together a team and getting some decisions made, but I wish him the best of luck.
"It's really important that Wellington gets it right, you've got Let's Get Wellington Moving, it's a $3.4 billion project, if you screw this up the city's really going to be in a bad place."
Mayor Andy Foster said he was pleased to be able to get on with the job, now there was no possibility of further legal challenges.
"It is unfortunate that it has taken this long to get to this point," Mr Foster said in a statement.
The decision showed voters could have confidence in the integrity of the voting system, "both in Wellington and around the country", he said.
"And it has also saved the ratepayers the significant cost of a recount.
"The Chief Electoral Officer's evidence was very strong, showing the system was very robust and there were checks and balances.
"The evidence was also that a good number of the partial and informal votes were votes cast for me, and even if they had been counted, the result would not have changed."
New Zealand Post is confident voting papers in the local body elections for Wellington City Council would have made it to their destination in time to be counted, if they were posted by the due date.
NZ Post said it does a significant amount of planning and preparation specifically for the local government elections, sending out 3.2 million voting papers to almost two million households.
It said there was a two week period between voting papers arriving and voting papers needing to be sent back - which it believes provided plenty of time to allow for minor anomalies.
Postal vote returns are processed at a faster rate for the final three days of the election period, it said, and it has a special stacker on sorting machines, to quickly separate out the votes being returned to the electoral officers.
On the final morning of Election Day, a special team at each of the mail centres does a final sweep, maximising the number of votes that are received and counted, on time.