Geri Müller, a member of the Green party who is also a federal MP for the canton of Aargau, was suspended by the council two weeks ago to give the politician time to clarify the situation.
On Tuesday, Müller announced he had decided to stay on as mayor against the recommendations of his fellow councillors.
The council issued a statement regretting Müller’s decision, saying his resignation would have been in the best interest for the city and its operations.
Council said it put “the public interest, the credibility of political leadership and the image of the city of Baden above the personal interests of (Müller)”.
It assigned Müller’s responsibilities temporarily to the deputy mayor Markus Schneider, a member of the Christian Democratic party, until they can be redistributed.
The mayor will be left with only ceremonial duties.
The scandal over Müller’s selfies, dubbed “GeriGate” by Swiss media, came after a Swiss federal parliament secretary posted nude selfies to her Twitter account from her Bern office.
The secretary agreed to resign in a deal reached with parliament services that was announced earlier this week.
While Müller, 53, lacks support from fellow council members, 300 people recently rallied in his support in a demonstration outside city hall and he has received backing from local members of the Green party.
He maintained on Tuesday that his work as mayor had never been criticized by his colleagues on the council and that he remained committed to working for the interest of Baden.
Müller earlier said he was ashamed when details of the selfies and his internet relationship with a 33-year-old teacher from Bienne leaked out.
But while admitting to being naive and behaving stupidly, he argued that he did nothing legally wrong.
During an SRF TV chat show Müller said in the end the issue was just about him showing his “privates” (he used the German slang, pimmel) in a public place.