Sadiq Khan has been elected as Labour's candidate for London mayor - boosting speculation that left-winger Jeremy Corbyn will be named party leader tomorrow.
The Tooting MP comfortably defeated Blairite former Olympics minister Tessa Jowell, scooping up significant backing from the influx of party activists thought to have been attracted by Mr Corbyn's policies.
Current Tory London mayor Boris Johnson said the result was more evidence that Labour had "lurched to the left".
But Mr Khan immediately made clear he was ready to take a different approach to the party leadership if he thought it was in the interests of the capital.
"The number one issue for me is making sure I am London's advocate, and on the side of London," he told reporters after the announcement at the Royal Festival Hall.
"Sometimes that may mean there being tension between me and the Labour leadership. Other times we will be probably on the same side."
Bookmakers William Hill immediately installed Mr Khan as 8/11 favourite to become London mayor next May, ahead of likely Conservative rival Zac Goldsmith on 11/10.
After the second preferences of other candidates were redistributed he took 58.9% of the vote in the final round of counting, against Baroness Jowell's 41.1%.
First to be eliminated, after receiving the fewest of the 87,954 votes cast, was Harrow MP and former international development minister Gareth Thomas, followed by transport campaigner Christian Wolmar, Tottenham MP David Lammy and left-wing former public health minister Diane Abbott.
In the final round, Mr Khan took 48,152 votes to Baroness Jowell's 33,573. He ended up only marginally ahead among party members, but racked up 17,179 preferences from registered supporters who had paid just £3 to vote compared to 6,351 for Lady Jowell.
He won among union affiliated supporters by 5,990 to 3,203.
Accepting his nomination at London's Festival Hall, the former shadow justice secretary said he was "overwhelmed and deeply humbled". "I'm determined to repay your faith by winning the mayoral election next May and making a real difference to Londoners' lives," he said.
Mr Khan nominated Mr Corbyn to help him enter the leadership race, though he said that he had actually voted for Andy Burnham as leader.
Mr Corbyn welcomed the result with a message on Twitter: "Congratulations Sadiq Khan for becoming London's Labour mayoral candidate - regardless of leadership result I look forward to working with him."
Fellow leadership candidate Yvette Cooper said: "Congratulations to @SadiqKhan. Look forward to campaigning for London elections - he'll be a great Labour London Mayor!"
Mrs Abbott said: "I'm pleased that most of my supporters transferred their votes to Sadiq.
"Labour beat the Tories in London this May. Now with large numbers of new members and supporters we aim to defeat the Tories, to ensure London government changes and works for all."
Paul Maloney, regional secretary of the GMB union said: "This is a convincing win for Sadiq. We now want to see all parts of the party uniting to secure a win in the election next year."
Peter Kavanagh, Unite's London and south east regional secretary, said: "The selection of Sadiq Khan to be Labour's mayoral candidate is a vindication of the progressive polices he set out during the campaign.
"On housing, transport and employment Sadiq offered a positive vision that will deliver the change Londoners are crying out for and with Sadiq as Labour's candidate I am sure we will win."
Current Tory mayor Mr Johnson said: "This result confirms that Labour has lurched left.
"I am more confident than ever that sensible one nation conservative policies are right for the working people of London and I hope that they will prevail next year."
Mr Khan, 44, entered Parliament in 2005 and took ministerial posts in the communities and transport departments under Gordon Brown. He was appointed to Ed Miliband's shadow cabinet as shadow justice secretary and shadow lord chancellor in 2010, but quit following this year's general election defeat to pursue the mayoral nomination.
He is the first major party candidate to be formally named, though the Liberal Democrats are shortly expected to confirm their nomination of Caroline Pidgeon from a shortlist of one. Sian Berry has been chosen as Green contender, while the Conservatives are due to announce their choice from a shortlist of four - including millionaire MP and environmentalist Zac Goldsmith - by the end of the month.
Mr Khan confirmed that if elected mayor next year he would stand down from the Commons.
"Being mayor of London is a full-time job, so much as I love Tooting ... I don't think it is possible to be a Member of Parliament and a mayor at the same time," he said.