Sadiq Khan and Zac Goldsmith vividly reflect the traditional class division between Britain's Labour and Conservative politicians.
Labour's Khan, a former human rights lawyer, emphasizes his humble beginnings, while Goldsmith, who grew up in London's affluent Richmond Park area, has played down his roots in one of Britain's wealthiest families.
"My story is a story of London," Khan, who was a minister in the last Labour government, tells voters.
"My father was a bus driver and my mother sewed clothes. London gave me the chance to go from a council estate to helping to run a successful business and serving in the cabinet," Khan said, promising "all Londoners the same opportunities that our city gave me."
Goldsmith has vowed to continue the policies of the city's popular current mayor, Boris Johnson, a close ally who is leading a campaign for Britain to leave the European Union in a referendum on June 23.
"Over the past seven years, Boris has put London back on the map. We have seen record investment, jobs created, crime down, and tube delays down," said Goldsmith, who has an estimated personal fortune of 75 million pounds (about 109 million dollars), according to the Sunday Times Rich List.
"We have a once-in-a-lifetime chance to lock in and build on this progress so it is not wasted," he told voters.
Opinion polls put Khan marginally ahead and many analysts expect him to become London's first Muslim mayor.
Joined in the contest by minor players from the Liberal Democrats, the Green Party, the UK Independence Party and others, Khan and Goldsmith both claim they offer the best solutions to London's housing crisis and its crumbling public transport infrastructure.
They stand on opposite sides in the debate over a Brexit, or British EU exit, with Goldsmith backing Johnson's Leave campaign and Khan, like most senior Labour figures, supporting Remain. But Brexit has featured little in the campaigning.
"I think London's politics, and the mayoral politics, are a long way removed from the EU referendum," says Tony Travers, a political scientist at the London School of Economics who predicts a maximum voter turnout of 37 per cent.
Khan's religion and the Conservatives' claim that he has associated with extremists have overshadowed other issues in recent weeks, as a vicious argument reached parliament.
Vince Cable, a former Liberal Democrat business secretary in the 2010-2015 coalition government, accused Goldsmith of joining a "dog whistle anti-Islamic" campaign against Khan.
Cable spoke out after Goldsmith labelled Khan a "radical" and published apparently untrue statements about him in campaign leaflets aimed at voters of South Asian origin. Goldsmith also accused his rival of associating with Islamic extremists.
Addressing Goldsmith on Twitter, Khan said there was "no need to keep pointing at me and shouting 'he's a Muslim.' I put it on my own leaflets."
Goldsmith denied that he was focussing on Khan's religion, saying his rival was "shouting Islamophobia to close down legitimate questions."
The controversy escalated in parliament on April 20, when Prime Minister David Cameron said Labour "has selected in London someone who sits on platforms with extremists," prompting Labour leader Jeremy Corbyn to interrupt him with a shout of "Disgraceful!"
Cameron did not back down, saying it was "right to question their judgement" if someone associates with extremists. He claimed Khan "has appeared on a platform with Suliman Gani nine times; this man [Gani] supports IS [Islamic State]."
Gani, a Muslim cleric, responded by saying he had "campaigned against the evils of Islamic State," while Khan said Cameron's intervention was a sign of Goldsmith's "divisive, Donald Trump-style campaign."
Khan admitted he had attended the same events as Gani and other outspoken Muslims, but only in his capacity as a human rights lawyer.
Omer El-Hamdoon, president of the Muslim Association of Britain, said in a statement that the mayoral campaign was symptomatic of "the normalisation of Islamophobia in an attempt to win votes."
Other Muslim groups raised concerns about the Conservatives' campaign, while the group Measuring Anti-Muslim Attacks urged both sides to "tone down the heated rhetoric" and focus on the policies.