Labour's John Biggs has been elected mayor of Tower Hamlets in east London, replacing Lutfur Rahman who was forced out of office in April.
He saw off his independent rival Rabina Khan after first and second preference votes were counted. Biggs won 32,754 votes with Khan the runner-up on 26,384 votes - a margin of 6,370 votes.
Rahman - Britain's first Muslim directly elected mayor - was found guilty at the Royal Courts of Justice of corruption at the 2014 local election.
Election commissioner judge Richard Mawrey declared the contest void and banned him from standing for mayor again.
Former Labour Party member Rahman and his political agents was found guilty of making false statements, bribery and corruption.
Rahman was a "ruthless" operator who played the race card and exploited the Bangladeshi community in Tower Hamlets for political power, Mawrey said. Opponents were smeared with accusations of Islamophobia.
"As well as playing the race card, Mr Rahman was determined to play the religious card," the judge said.
The downfall of Rahman came via four voters in Tower Hamlets who took legal action against him. The case lasted 10 weeks.
The judge claimed all councillors in the Tower Hamlets First (THF) group led by Rahman had therefore been corruptly elected.
Rahman had denied the allegations, claiming there was scant evidence against him of malpractice.
"The real losers are citizens of TH especially Bengali community who have been led into sense of victimhood," Mawrey said.
There was stinging criticism as well for community leaders and also the police. Religious figureheads "stepped well over the line" of what is allowed in their campaigning on behalf of Rahman. Meanwhile, police in Tower Hamlets failed to act upon intimidation by supporters of Rahman at polling stations, Mawrey ruled.
Conservative candidate Peter Golds, who finished third in the mayoral election, said: "It's clear that a large number of our second preference votes have gone to Labour."
He also offered advice to Labour candidate and frontrunner Biggs on a potential win: "He can't run the borough in a tribal fashion. He has to ensure that he draws in Tower Hamlets First by the back door."