London's mayoral race had been a prince and pauper tale, as the son of a bus driving immigrant took on the scion of a banking dynasty in the battle to lead one of the world's richest cities.
But while the multi-millionaire ruling Conservative Party candidate Zac Goldsmith had the backing of London's powerful business community, it was the opposition Labour Party's Sadiq Khan who won the day, becoming the first Muslim mayor of a major Western city in the process.
As the fifth of eight children born to Pakistani immigrants, Khan's heritage had consistently been targeted by Goldsmith, who was accused of seeking to stoke racial tensions at a time of widespread public anxiety over Islamic extremism and Europe's ongoing refugee crisis.
But with many Londoners feeling the pinch from housing and transport costs that have spiralled over the past eight years of Conservative rule, Khan's pledge to freeze public transport fares for his four-year term and build thousands more affordable houses, while urging people to choose hope over fear, saw him sweep the election by a landslide nine percentage point margin.
Goldsmith is the eldest son of James Goldsmith, the heir to a centuries-old banking dynasty who died in 1997, leaving Zac an estimated £300 million ($430 million) fortune at the age of 22. He has served as a Member of Parliament since 2010 and is a renowned environmentalist, who had sought to emphasize his green credentials during his campaign.
But by election day on Thursday, polls had widely predicted that former Transport Minister Khan would achieve a clear victory, and he ended up claiming 44 percent of the popular vote to Goldsmith's 35 percent, among a field that included ten other candidates. His victory returns the London mayoralty to the Labour Party after two terms of Conservative rule under Boris Johnson.
Khan's campaign saw him pledge to be a "Mayor for all Londoners" who would bridge ethnic and cultural lines in a city where over 40 percent of the population were listed as non-white in a 2011 census, and more than one third are foreign-born.
Goldsmith's campaign on the other hand was marked by what critics said was a cheap attempt to whip up fear, with right-wing newspapers sympathetic to his campaign seeking to highlight Khan and his family's alleged links to Islamic extremists.
The fact Khan had appeared in the past at events aimed at the Muslim community at which radical Islamic clerics were also allowed to speak was repeatedly cited as evidence he was not to be trusted, a campaign tactic which drew widespread rebuke from commentators who said it insinuated that Khan was a dangerous choice for mayor because he was Muslim.
In an article published by the Mail on Sunday four days before the election and purportedly written by Goldsmith himself, the Conservative Party candidate said Khan had "repeatedly legitimized those with extremist views" by sharing platforms with radicals. The article was accompanied by a photograph of a bus bombed during terror attacks in London in 2005 — a decision which saw criticism for Goldsmith surge, including among Conservative Party members.
If you've yet to hear it, best quote on Zac campaign from senior London Tory: 'A dog whistle in a city with no dogs.' #londonmayor2016
— DaveHill (@DaveHill) May 6, 2016
Many people took to social media to point out that the far-right British National Party had previously attempted to use the 2005 London bombings for political gain, with senior Conservative Party politician David Davis at the time branding them "tasteless and bigoted" for doing so.
BNP uses 7/7 bus bomb photo https://t.co/QPAZPmTEDs
Zac Goldsmith uses 7/7 bus bomb photo
What does that say? pic.twitter.com/XIeRVJaTID
— Marcus Chown (@marcuschown) May 2, 2016
Harsh criticism came from senior Conservatives and Goldsmith's own sister soon after the result became clear. Former Conservative party chairman Sayeeda Warsi condemned his "appalling dog whistle campaign," while Jemima Goldsmith said it was sad her brother's campaign "did not reflect" the person she knew him to be — an eco friendly, independent- minded politician with integrity.
While Goldsmith had sought to play on tensions, many of Khan's supporters and liberal commentators had argued that although his religion should not be a primary concern in his candidacy, choosing a Muslim would send a clear message that one of the Western world's most important cities rejects the fear and division both Islamic extremists and the increasingly vocal far-right seek to promote.
Khan now immediately takes on the role as mayor, after Johnson officially stepped down two days ago. The new mayor has pledged to address London's housing crisis by building thousands more affordable homes at a time when rising prices are forcing less affluent people to move increasingly far from the city center.
Khan's public transport fare freeze also comes in the face of a 40 percent rise in ticket prices under Johnson, while he has also pledged to introduce a "one hour" bus ticket allowing users multiple transfers within an hour in order to reduce transport costs for individual journeys.
Thursday also saw regional elections held across the UK, with neither Labour nor the Conservatives having great reason to celebrate as votes were still being counted on Friday afternoon. In the first electoral test for Labour under its new leader Jeremy Corbyn — a far-left longstanding MP who won a surprise victory to take the reins of the party in September 2015 — Labour held control of many county and city councils but failed to make any real gains in the results announced so far. It also came in third place in parliamentary elections in Scotland, a former stronghold, thanks to the continuing surge in popularity for the Scottish National Party, which won the most amount of seats but failed to secure a majority.
The Conservatives had hoped to make major gains over Labour in light of Corbyn's controversial leadership and a pre-election week in which the opposition was rocked by accusations of anti-Semitism. But like Labour, it mostly held on to councils it already controlled, wrestling just one local authority from its rivals by the time of this article's publication.
Follow Charles Parkinson on Twitter: @charlesparkinson