Dunedin mayor Jules Radich says council will replace his deputy as soon as possible.
The city's deputy mayor, Sophie Barker, has resigned from the role saying the mayor's decision not to sack a community board chair accused of racial abuse was the last straw.
Barker and senior city councillor Jim O'Malley filed a complaint about Radich for minimising a racist outburst by community board chairman Barry Williams.
In Barker's resignation letter, she said it would be hard to imagine that a series of interviews the mayor gave on the topic had not undermined the council's integrity.
It would be difficult to maintain a close working relationship with the mayor after she had laid a code of conduct complaint against him, Barker said.
Radich accepted her resignation and said work would continue as normal in the meantime.
Barker was not available for an interview and RNZ has contacted Radich for further comment.
Councillor Jim O'Malley told RNZ he had been aware that Barker was going to resign and it had come in response to them laying a complaint against Radich.
"I guess the issue is that a deputy mayor's position is often ceremonial, but they have to step in for the mayor quite often and therefore they need to be well aligned with the mayor and councillor Barker had basically come to the decision that she could no longer maintain that alignment."
Barker remains the chair of the council's strategy and planning committee, he said.
"So in many respects most of what she stepped away for is ceremonial and the actual functional component she performs at the council she still maintains."
O'Malley said some details of the complaint the pair made against the mayor would not be likely to be made public until an investigation had taken place.
"But it's effectively around process, so we're required under our code of conduct to protect any confidentiality of any meeting we've gone into and we're also required to uphold council's positions once they've been made.
"And essentially the code of conduct complaint addresses those areas."
Another councillor, Andrew Whiley, said Barker was an extremely hard working deputy mayor.
He said he understood her decision to step down from the role and acknowledged the reason behind the code of conduct complaint that she and councillor O'Malley lodged.
But councillor Carmen Houlahan had criticised the complaint having been made in the first place.
Asked whether councillors would be able to work together with this level of division, O'Malley said they would have to.
"It's our responsibility back to the people who've elected us to behave in a professional manner."
O'Malley said people should wait until they had seen the complaint before forming opinions.
He said he did not want to interfere with the investigation process but due to public interest in the matter they were hoping to get the complaint released as soon as possible.
If you follow the correct process, you end up with the right outcomes, he said.
"We're just basically calling the mayor back and saying 'you cannot go off and do extemporaneous interviews' - cause that's what he's done and that's what he did in that instance as well."
They had been undermined by the mayor doing that a couple of times which was why the deputy mayor was "exercising her frustration", O'Malley said.