A candidate for a mayoral election who was dumped by Labour then stood as an independent won the contest with more than half the vote early today.
Lutfur Rahman secured 51.76% of the vote in Tower Hamlets in east London.
The campaign sparked bitter local infighting for Labour.
Former council leader Mr Rahman was Labour's initial candidate, but when he was rebuffed by the party he announced he would stand as an independent with the backing of several Labour councillors.
Labour's contender for mayor of London, Ken Livingstone, then risked internal discipline by campaigning for Mr Rahman against the party's new candidate, Helal Abbas.
The row gave new hope to the Conservative, Liberal Democrat and Green would-be mayors in an area which has traditionally been solidly Labour.
Yesterday's poll was the first ever ballot for a directly elected mayor in Tower Hamlets, a borough which takes in not only the poor neighbourhoods of the East End, but also the glass-and-steel skyscrapers of the Docklands financial centre.
Mr Abbas launched a bitter attack on his erstwhile party colleague, accusing him of being "in the gutter".
"This is a sad night for those of us who want to build a better future and a united Tower Hamlets. Lutfur Rahman has won tonight but not as he wanted, as the Labour candidate," he said in a statement.
"Thankfully, Labour's ruling National Executive had the backbone to stop him from being the Labour candidate. We may have lost tonight, but at least the Labour Party has clean hands.
"I am proud that we fought a clean, decent campaign and refused to get in the gutter with the candidate backed by George Galloway and the so-called Respect Party.
"I promise to carry on working tirelessly as an elected councillor for the people of Tower Hamlets. And as the party with the largest number of councillors at Tower Hamlets Town Hall, Labour accepts our responsibility to work hard to hold the new Mayor to account and to stand up for all the communities of Tower Hamlets, not just one."
The result will further fuel calls for Mr Livingstone to be disciplined.
Earlier this week, the veteran politician called the deselection of Mr Rahman an "utterly unacceptable" move by Labour's ruling National Executive Committee (NEC) which "ignored the views of the local electorate".
He insisted however that he backed the official candidate and was simply trying to encourage voters to put the independent down as their second choice in an effort to keep out the Conservatives.
Turnout was 25.6%.
Votes were as follows:
Helal Uddin Abbas, Labour Party - 11,254
Alan Duffell, Green Party - 2,300
John David Macleod Griffiths, Liberal Democrats - 2,800
Neil Anthony King, Conservative Party - 5,348
Lutfur Rahman, Independent - 23,283.