Sadiq Khan began his ceremonial duties as the new mayor of London in triumphant style, less than 12 hours after he was officially confirmed in the role.

The Labour MP was greeted warmly by actor Sir Ian McKellen as he strolled into Southwark Cathedral for his signing-in ceremony on Saturday morning, marking the end of the Conservatives' eight-year reign under Boris Johnson at City Hall.

Mr Khan, who stood on a ticket of being "a mayor for all Londoners" to become the first Muslim leader of a major Western city, was given an impromptu standing ovation and received rapturous applause as he entered the packed cathedral shortly after 11.36am.

Mr Khan received a second sustained burst of applause and loud whooping when he introduced himself with: "My name is Sadiq Khan, I'm the mayor of London."

During an address lasting barely four minutes, the human rights lawyer-turned-politician brought laughter from the floor as, in a nod to a much-referenced and parodied theme of his election campaign, he said: "Some of you don't know, but I grew up on a council estate."

He repeated his vows to be a "mayor for all Londoners" during the short, multi-faith service.

He said: "I can't believe the last 24 hours. I want to start my mayoralty as I intend to go on. I want this to be the most transparent, honest and accessible administration London has ever seen."

Mr Khan said his "burning ambition" was for people all across the capital to have the same opportunities he enjoyed.

Labour leader Jeremy Corbyn led congratulations on Twitter using the hashtag YesWeKhan, telling the new mayor: "Can't wait to work with you to create a London that is fair for all".

But he was conspicuously absent from the formal signing-in ceremony.

Former Labour leader Ed Miliband, a close ally of Mr Khan, Met Police commissioner Sir Bernard Hogan-Howe - of whom Mr Khan will be scrutineer-in-chief - and campaigner Baroness Lawrence, mother of murdered black teenager Stephen, were all present as Dean of Southwark Andrew Nunn told the congregation Mr Khan's victory brought a "carnival atmosphere" to the sacred building.

Baroness Lawrence added: "This really is a glorious day.

"I never imagined in my lifetime I could have a mayor of London from an ethnic minority."

Mr Khan took 1,310,143 votes after second preferences were taken into account, beating Conservative Zac Goldsmith into second place on 994,614. His tally gave him the largest personal mandate of any politician in UK history.

The MP for Tooting referenced the campaign against him in his victory speech but said that London had chosen "unity over division" and "hope over fear".

In a Facebook post, defeated Mr Goldsmith also congratulated Mr Khan and thanked "the hundreds of thousands of people who trusted me with their votes".

But there were recriminations from Mr Goldsmith's side over his decision to target Mr Khan as a "radical" and highlight his supposed links with Islamist extremists.

Conservative former Cabinet minister Baroness Warsi said the "appalling dog whistle campaign" had "lost us the election, our reputation and credibility on issues of race and religion", and Mr Goldsmith's sister Jemima said the way the contest was fought "did not reflect who I know him to be".

Mr Khan delivered a barbed judgment on the Goldsmith campaign in his acceptance speech at City Hall.

Without naming his Tory rival, he said Labour had fought a "positive" campaign, adding: "Fear doesn't make us safer, it only makes us weaker, and the politics of fear is simply not welcome in our city."

Mr Khan's 57% support after second preferences were counted amounted to a landslide victory on the largest turnout in the history of directly-elected mayors in London.

Labour fell one seat short of an overall majority on the London Assembly which scrutinises the mayor, taking 12 seats to the Tories' eight. Greens took two seats, Liberal Democrats one and Ukip won two seats - the party's first since 2004.

Labour MP David Lammy predicted that Mr Khan's victory could pave the way for a candidate from an ethnic minority to enter Number 10.

"If we ever get a prime minister of colour, it will be because of what Sadiq Khan has achieved," he said.

Tottenham MP Mr Lammy, who stood against Mr Khan for the Labour mayoral nomination, told the BBC Radio 4 Today programme Mr Khan "is a grafter, he is someone who gets on with people, he is someone who is pragmatic when he needs to be and he certainly has a vision for this city".

The Conservatives, meanwhile, have complained after a council blunder meant many voters in north London were turned away from the ballot box.

Names were missing from polling lists across Barnet and residents who attempted to cast their vote were stopped.

The council apologised for the bungle and later offered emergency proxy votes to residents who had been affected.

The leader of the Conservative group in the London Assembly, Gareth Bacon, demanded a "full and urgent inquiry", claiming any lost votes could have affected the allocation of London-wide seats, and also hit out at the delays in the mayoral election results.

He said: "The total incompetence of London Elects and Barnet Council in their handling of this ballot has led to serious questions over the London-wide list result and caused huge delays in the counting process.

"To have voters turned away for any reason is completely unacceptable. The votes that were unable to be cast could very well have altered the result of the London-wide list allocation. It is essential that voters have faith in the electoral process and effectively disenfranchising people for three hours on polling day totally undermines this.

"We are demanding a full explanation for this abysmal administrative performance. London Elects and Barnet Council have had four years to plan for this but they both failed to get it right when it mattered and the voting public has suffered.

"I am calling on all parties to back my motion for a full and urgent inquiry so we can establish what caused these catastrophic blunders."

Greater London returning officer Jeff Jacobs said he would hold an investigation into the delays in the mayoral count.

He said : "Obviously we regret the delay - but it was absolutely right and proper to take the few additional hours in order to ensure we produced a robust set of figures.

"I must take this opportunity to thank everyone - candidates, agents, media, staff and most importantly, Londoners, for their patience.

"After every London election since 2000, the Greater London Authority has held a full review into the way the election was conducted. I intend to hold my own investigation and will co-operate fully with any other review."

Cardinal Vincent Nichols, the Archbishop of Westminster and the most senior Catholic cleric in England and Wales, congratulated the new mayor.

He said: "I assure him (Mr Khan) of my prayers for his time in this important office in which he will face the great challenges of London, in its richness, diversity and energy.

"Yesterday Pope Francis reflected on these challenges.

"Speaking of the great cities of Europe he used these words: ' Many of our cities are remarkably beautiful precisely because they have managed to preserve over time traces of different ages, nations, styles and visions...the richness and worth of a people is grounded in its ability to combine all these levels in a healthy coexistence. Forms of reductionism and attempts at uniformity, far from generating value, condemn our peoples to a cruel poverty: the poverty of exclusion. Far from bestowing grandeur, riches and beauty, exclusion leads to vulgarity, narrowness, and cruelty. Far from bestowing nobility of spirit, it brings meanness'.

"May this same spirit inspire the leadership of our new mayor."

The new mayor of London's first public engagement following his signing-in will be at a Holocaust Remembrance Day ceremony in Barnet, north London.

Mr Khan will appear alongside a number of prominent figures in the Jewish community to commemorate the millions slaughtered during the Nazi genocide of the Second World War.

The appearance comes after Mr Khan took a strong stance against anti-Semitism during the racism scandal which engulfed the Labour Party in recent weeks.