The rise of Sadiq Khan, the son of a bus driver and seamstress who grew up on a public housing estate and who has just been elected mayor of London – and who happens to be Muslim – is nothing short of extraordinary.

But it might also tell the Labour Party how it could win the next election.

Significantly, Labour leader Jeremy Corbyn did not attend Khan’s swearing in ceremony . Instead of appearing alongside Mr Khan, Mr Corbyn travelled to Bristol to congratulate that city’s new mayor Marvin Rees.

“I am meeting Sadiq over the weekend, I have been in touch with him. We are getting on fine. I have sent him a message of congratulations,” he told reporters.

Still, it has to be said, there is no love between Khan and Corbyn.

Khan did not support Corbyn for leader. Instead, he voted instead for Andy Burnham. A leading figure of Labour’s “soft left”, he played a key role by supporting Ed Miliband as leader in 2010 against his Blairite brother David.

Last year he branded the Labour leader’s refusal to sing the national anthem as “very unwise and disrespectful” and called on Labour to ditch its “anti Jewish” image.

During the campaign, he criticised Jeremy Corbyn for not stopping “unacceptable” racism against Jews from some Labour members.

“It is unacceptable for 2016 that there is anti-Semitism in the Labour Party. It is with sorrow that I wear that badge of shame,’’ Khan said. “We need to walk the walk not simply talk the talk. There should be no hierarchy when it comes to racism. Racism is racism.”

It was the last thing Corbyn trying to keep the splintering party together needed to hear.

Khan also made some veiled criticisms of Corbyn in a column in the Observer.

“Labour only wins when we face outwards and focus on the issues that people care about; second, we will never be trusted to govern unless we reach out and engage with all voters – regardless of their background, where they live or where they work,’’ he said.

“Labour has to be a big tent that appeals to everyone – not just its activists. Campaigns that deliberately turn their back on particular groups are doomed to fail. Just like in London, so-called natural Labour voters alone will never be enough to win a general election. We must be able to persuade people who previously voted Conservative that Labour can be trusted with the economy and security, as well as improving public services and creating a fairer society.”

Is this a signal that Mr Khan may position himself for a run at the party leadership once his term of office in London’s City Hall comes to an end in 2020?

The Economist makes the point that Khan, like his predecessor Boris Johnson, seems to have a habit of saying whatever he thinks his audience wants to hear. Some see him as an opportunist, but one that will be successful.

“He is unprincipled, but I don’t mean that in a negative sense. I see him like Nixon, the primary unprincipled politician of modern times, unknowable, highly successful electorally,” one MP told the Financial Times.

Corbyn is unlikely to face any coup in the immediate future. But the anti-Corbyn forces, buoyed by the elevation of Khan, could move after the country votes on the EU.