Lester's argument claimed 193 of these partial votes would have swung in his favour and just 109 in Foster's, changing the outcome of the mayoralty.
Under the single transferable vote system (STV) candidates are ordered by preference but the rankings must follow an unbroken sequence.
For example, if a voter ranked candidates with numbers 1, 2 and 4, having left out a number 3, then votes would only be valid for 1 and 2. After that, the electoral officer would not be able to determine preferences.
But Lester argued those votes should be counted because it was voters' intent that mattered.
However, the District Court judge was satisfied these preferences could not be counted.
"Mr Lester's belief cannot be considered to be reasonable if it requires a recount to be run contrary to the very regulations that prescribe the process that must be followed for the counting of votes."
Furthermore, according to the Chief Electoral Officer report, 145 of those 193 votes would actually have already gone to Foster because he had a valid preference before the sequence break.
The judge said at the end of the decision on the application: "I am satisfied from the report provided by the Electoral Officer that the process was carried out in accordance with the regulations and there are sufficient quality assurance and other checks in place to provide confidence in the results."
Foster has welcomed the decision.
"This shows we can have confidence in the integrity of the voting system, both in Wellington and around the country, and it has also saved the ratepayers the significant cost of a recount.
He was pleased both he and his councillors could put the recount question behind them.
"We can now move on with certainty and get on with the business of council.
"It is unfortunate that it has taken this long to get to this point."
Lester said he fully respected the judge's decision and that would be the end of the matter.
He said he was proud of the work he'd done over the past three years and wished the new council all the best for the next three.
Lester said he was going back to having a "different life" and was looking forward to that.
"It's already been quite refreshing over the last couple of weeks to have dinner with my children, to be able to pick them up from school occasionally, and to have some family time."