The office of the mayor of London as we know it today was created in the year 2000. Since then three men have held the post, each carving out their own platform on the national and international stage. BBC London's political editor Tim Donovan looks at the moments that defined the role.
Following a referendum in 1998 London got its first directly elected mayor. Alongside new devolved powers came an opportunity to shout loudly again for the capital.
For London's mayor, there was a chance to fashion a distinctive leadership role. It was not one that could be defined precisely, but over two decades it has come to mean many things.
Attack on 7/7
Mayors have articulated responses to both crisis and celebration.
In July 2005, Olympic triumph and terrorist tragedy became entwined in 48 hours of euphoria and mayhem.
On 7 July, four suicide bombers with rucksacks full of explosives attacked central London.
They killed 52 people and injured hundreds more. It remains London's worst single terrorist atrocity.
It was an examination not just of the resilience of the city itself, but of the qualities of the politician elected to speak for it.
At the time, and again when recalled on the 10th anniversary in 2015, Ken Livingstone's response was widely praised.
Ken Livingstone was in Singapore, with London just having won its bid to host the 2012 Olympics.
His speech, hastily put together in a hotel lobby, was an evocative blend of the language of shared defiance with a sense of the unfolding practical response from the emergency services - who were working together closer than ever as part of devolved city government.
The protocols around communication in response to acts of terror in the capital are still built primarily around the prime minister and the Metropolitan police commissioner.
But is it to the mayor that Londoners now look for reassurance?
It is now an essential part of the mayoral job specification to be able to capture tone and mood, and reflect Londoners' collective pain and pleasure.
Sorry seems to be the hardest word
One notable feature over the two decades has been mayoral defiance, characterised by bullishness towards the media and opponents, and a refusal to say sorry.
For a brief moment in 2005, the capital was even without a mayor after Ken Livingstone lashed out verbally at a journalist after a City Hall party.
Mr Livingstone - by now a Labour mayor after defying the party to win as an independent in his first term - was suspended from office. He was soon reinstated after a High Court judgement effectively found he had the right to be offensive and didn't have to apologise.
Such was Mr Livingstone's disdain for the Evening Standard - at a time of unremittingly hostile coverage - that he couldn't find a detached, apologetic tone that might have better addressed allegations over funding by the London Development Agency, involving his adviser Lee Jasper. The allegations were later dismissed.
The sky's the limit
During the 2012 London Olympics, Boris Johnson took international (self?) promotion to new and dizzying heights, when he became suspended on a zip-wire in Victoria Park in east London.
Some blamed the Conservative mayor's weight and a technical malfunction.
But - going against the guidance of the operators - he stretched out his arms, waving little union flags, rather than folding them across his chest.
Investigating afterwards, Tower Hamlets Council's environmental health team found nothing wrong with the equipment.
Surely this wasn't part of a plan?
Three years later in Japan, a demonstration of street rugby in Tokyo was coming to an end when Mr Johnson turned to begin his last run.
With two UK photographers well known to him ideally positioned, a 10-year-old boy called Toki was sent flying to the ground.
Could anyone ever prove this was deliberate? Yet the desired effect was achieved.
An international trip of otherwise minimal consequence was eclipsed by a viral video - with London and its mayor duly promoted across the globe.
Home and away
All three mayors have been in the beam of the international spotlight on occasion.
The current mayor has, er, trumped the lot.
As the president of the United States touched down at Stansted airport at the beginning of his official visit in June 2019, a couple of tweets landed with him.
They labelled Sadiq Khan as a "stone-cold loser" doing a "terrible" job.
Forget zip-wires - wasn't this hitting the political jackpot?
Mr Khan had first condemned Donald Trump for proposing a temporary travel ban for Muslims coming into the US.
It is a notable PR triumph when the most powerful politician on the planet, however unusual, knows who you are and can be bothered to attack you.
Mr Khan, previously a Labour MP, had already come to widespread attention as the first Muslim elected to lead a Western capital.
But the spat fitted with his aspirations.
Ken Livingstone did a highly unusual deal with Venezuela's Hugo Chavez.
He organised discounted oil for London's bus fleet in return for Transport for London (TfL) officials sorting out the traffic problems in Caracas.
But while making a visit to Venezuela, Mr Livingstone only got as far as Cuba, before Mr Chavez called off their meeting because of an election campaign.
There was no meeting either with the ailing Cuban leader Fidel Castro, leaving Mr Livingstone to sit reading a biography of former Vietnamese premier Ho Chi Minh in the gardens of Havana's National Hotel before flying back - to the glee of his Tory opponents.
All three mayors have clearly seen themselves as international players.
Eloquent in his belief that cities drive progress, Mr Livingstone was the prime force behind the C20 - now expanded to the C40.
It's a network of major world cities pooling ideas and their combined urban spending power to drive innovation in tackling climate change.
Under Mr Johnson, though, London lost its leadership position in the group.
In 2009, at its annual international conference in South Korea - attended by Bill Clinton - Mr Johnson was sidelined and sloped off for a sightseeing trip to the demilitarised zone at the 38th parallel.
Over 20 years, the mayoralty has undoubtedly hit turbulence from time to time.
Conflicts between the last mayor and the current one - who is now of course the prime minister - raise doubts about how best to deliver transport, planning, housing and policing in the capital.
About 17% of the mayor's £17bn budget come from government grants.
Can a pugilistic approach work in a country where mayors rely heavily on central government for their resources?
It feels like the time for a reappraisal.
As for the office-holders, what unites them is showing, more than occasionally, a distinctly independent streak.
This is an edited version of a chapter in London's Mayor at 20: Governing a global city in the 21st century.