A legal challenge to the result of the Christchurch City Council election is underway in Christchurch.
The incumbent, Deon Swiggs, lost his Central ward seat to Jake McLellan after allegations that Mr Swiggs had engaged in inappropriate late-night messaging with young people, and insisted on hugs instead of handshakes.
The reporting of the allegations derailed Mr Swiggs' campaign, although Mr McLellan has maintained he was always on track to win.
Supporters of Mr Swiggs have gone to court claiming the allegations were deliberately released to the media by Mr McLellan's team to sabotage Mr Swiggs' campaign.
If the judge finds Mr McLellan was not duly elected, it could trigger a re-election in the ward.
The hearing is scheduled to last three days.
Last month, the Christchurch City Council announced it had abandoned an investigation into the complaints, because its Code of Conduct could only be enforced for sitting councillors.