Andy Foster has been elected mayor of Wellington, ousting incumbent Justin Lester.
The candidates have had a nailbiting wait for results after a large number of last-minute ballots were still to be counted today.
The preliminary result released shortly after midday showed Mr Foster received 26,707 votes compared to Mr Lester's 26,204 votes.
Mr Foster's margin of 503 was lower than the 715-vote lead recorded after 90 percent of votes were counted yesterday.
Wellington City electoral officer Warwick Lampp said all ordinary votes had now been counted, including those received yesterday, but more than 1700 special votes were still to be counted.
The final official result will be available later next week after special votes have been counted and confirmed but Mr Lampp said he expected Mr Foster's win would be confirmed.
Transport a priority
Mr Foster said he would push for a better bus service, rather than the light rail which Mr Lester had wanted.
He said transport was a big priority, and he wanted to get on with the city's Let's Get Wellington Moving project announced by the government in May.
The plan as it stands is to introduce mass rapid transit in the form of light rail or trackless trams first, but Mr Foster said a Mt Victoria tunnel was the priority. He said the region's mayors, the chamber of commerce, and other players would help push the government for it.
"The idea of doing the mass transit - whether it's light rail or trackless tram - I'm happy to do a business case to see whether it stacks up or not.
"On the numbers we've got at the moment it's going to be very difficult for us to afford it - it's putting an extra billion dollars on the council's debt line."
He wanted to make sense of the Let's Get Wellington Moving, and to improve the relationship with the regional council.
Mr Foster campaigned on keeping rates down, and said today the cost of light rail, and many other projects in the city, would make that impossible.
But the spokesperson of transport lobby group Fair Intelligent Transport Wellington, John Rankin, said adding road capacity and not rapid mass transit will lead to a city of more cars.
"We will be encouraging more of the car dependent development that we've seen for the past 50 years and it's not really clear that that's a sustainable future," he said.
Mr Rankin said the narrowness of Mr Foster's win, shows there is an even split amongst residents about how the city should grow.
"I think his challenge as mayor is actually going to be to build a consensus across all of the council, including some of the very interesting new council members to actually take the city forward and forge a common path that people can agree on," he said.
On the controversial Shelly Bay development he said he wanted to see a development plan created for the area on the Miramar Peninsula, with input of the community.
He said the scale of the proposed development was too big, and the consultation had not been thorough enough.
"It's an issue of scale, and process, the process has been terrible on many counts.
"I think people want something to happen, it's just the scale proposed is too much."
Mr Foster said his main financial backers - Sir Peter Jackson and Fran Walsh - who oppose the proposed development would not influence his policy in any way, but he did say he had been a fan of Sir Peter's movie museum plan a long time.
Plans were scrapped in August 2018 for a combined museum and a convention centre in the CBD after the council and Sir Peter's team were unable to come to a decision.
A total of 39.88 percent of eligible voters cast a vote in Wellington City this election, down from 45 percent in 2016.
Justin Lester said he was disappointed but not surprised the counting of last-minute votes didn't swing the contest in his favour.
He said he called Mr Foster this morning, before the preliminary results came out, to congratulate him.
"I'm naturally disappointed - when you put yourself forward for public office you do so to win.
"I gave him a call this morning to say congratulations and good luck. I didn't think the special votes would change the result. it's narrowed it somewhat, but I thought it was going to be too much of a hill to climb, so I've said congratulations to Andy and I wish them the very best.
"He's got a good council there that's been elected and I hope they get on with some really exciting projects for the city", he said.
Mr Lester said he wasn't holding out hope that the counting of special votes would change anything and said that "ship has sailed".
"If more people had turned out to vote it might have been a different story, but that's not the case and that's up to me as mayor and as a candidate to make sure that you get people to vote. You've got to mobilise them and sell your vision to them", he said.
Mr Lester said he and his family would sit down and reflect over the next few days about what he will do next.
Justin Lester had only served one term as mayor. The last time a Wellington mayor was ousted after one term was in 1986, when Ian Lawrence lost to Sir James Belich.
Councillors elected on the basis of the preliminary results are Jill Day, Malcolm Sparrow and Jenny Condie (Takapū/Northern Ward); Diane Calvert, Simon Woolf and Rebecca Matthews(Wharangi/Onslow-Western ward); Iona Pannett, Nicola Young and Tamatha Paul (Pukehīnau/Lambton ward); Sarah Free, Teri O'Neill and Sean Rush (Motukairangi/Eastern Ward); Fleur Fitzsimons and Laurie Foon (Paekawakawa/Southern Ward).
On the Tawa Community Board, Steph Knight, Richard Herbert, Graeme Hansen, Robyn Parkinson, Jackson Lacy and Anna Scott have been elected as councillors based on the preliminary results.