Boris Johnson has defied the normal rules of politics for so long, it is hard to believe he is actually going.
Scandals that would have sunk other politicians appeared to have no effect on him. He was always able to bounce back. His gaffes and blunders became part of his brand.
In an age of boring, machine-like politicians, he was seen as a "character", his unruly mop of blond hair and bumbling persona instantly recognisable even to those with no interest in politics. His fun-loving, relentlessly upbeat image, allied to formidable campaigning skills, helped him reach parts of the electorate more conventional Conservatives could not.
He won two terms as mayor of London, normally a Labour stronghold, and helped convince millions to back Brexit in the 2016 EU referendum.
He became prime minister in July 2019 without an election - but four months later secured an historic landslide victory, winning seats in parts of the country that had never voted Conservative before. As 2020 dawned, his dominance of British politics appeared to be complete. But then came coronavirus.
A global pandemic would have tested any leader and Johnson's government made its share of mistakes, with the UK at one point having the highest death rate in the developed world.
But, in the end, it was not his handling of coronavirus that led to his downfall. It was, rather, questions about his character and fitness for high office.
To some long-time observers of Johnson's career, this did not come as a surprise. In an article for the Observer, his former boss at the Daily Telegraph, Sir Max Hastings predicted that a Johnson premiership would "almost certainly reveal a contempt for rules, precedent, order and stability".
From his earliest days, Alexander Boris de Pfeffel Johnson had a tendency to believe rules were for other people.
"Boris sometimes seems affronted when criticised for what amounts to a gross failure of responsibility," his teacher Martin Hammond wrote of the 17-year-old Boris. "I think he honestly believes it is churlish of us not to regard him as an exception, one who should be free of the network of obligation which binds everyone else."
His unwavering self-belief, however, left an impression.
"Boris's charisma even then was off the charts, so funny, warm, charming, self-deprecating," Simon Veksner, a school friend, told author Simon Kuper in his recent book Chums.
He won a scholarship to Eton, arguably England's most prestigious private school, where he discovered a love of Classics and began developing the persona that would become so familiar in his later life.
Oxford University followed, where he achieved his ambition of becoming president of the union - a debating society dating back to 1823, and the time-honoured training ground for Conservative politicians. He also joined the infamous Bullingdon Club, known for the rowdy, drunken behaviour of its members, which included future prime minister David Cameron.
He left Oxford and was taken on as a trainee reporter at the Times newspaper, but lost his job after falsifying a quote - an incident he would later describe as his "biggest cock-up". It proved to be a minor setback however, and in 1988 he was given work by then-editor of the Daily Telegraph, Max Hastings.
As the Telegraph's Brussels correspondent, Johnson set about ridiculing regulations passed by the European Commission - although many of his fellow reporters in Brussels felt his stories were exaggerated and in some cases simply untrue. It was, he told the BBC's Desert Island Discs in 2005, like "chucking these rocks over the garden wall - and hearing an amazing crash next door in England. Everything I wrote in Brussels was having this explosive effect on the Conservative Party - it really gave me this rather weird sense of power".
Disaster loomed again, however, when a recording surfaced of a telephone call between Johnson and his old Oxford friend, Darius Guppy, who had been demanding the private address of a News of the World journalist.
The tape suggested Johnson had agreed to supply the details, even though Guppy, who was later jailed for fraud, had indicated he had wanted to have the reporter, who had been investigating his affairs, beaten up.
Hastings confronted him about the recording, which had been sent anonymously to the Telegraph, but after an apology, with Johnson deploying, in Hastings' words, "all of his self-parodying skills as a waffler", he was sent back to Brussels with a rebuke.
In 1999, he became editor of influential right-wing magazine the Spectator, and two years later finally achieved his ambition to enter Parliament.
With the Tories languishing in opposition, then-leader Michael Howard was keen to harness the star power of the new MP for Henley, in Oxfordshire.
But Mr Johnson's career as a frontbencher was short-lived.
In 2004, Mr Howard ordered him to Liverpool to apologise to the entire city over a Spectator article that had attributed some of the blame for the Hillsborough disaster on the behaviour of the city's football fans. He survived "Operation Scouse Grovel", as he dubbed it, only to be sacked by Howard a month later for lying about claims he had had an affair with journalist Petronella Wyatt.
Within a year he was back on the frontbench, under new Tory leader David Cameron. But he was increasingly seen as comedian and TV personality, rather than a serious candidate for power.
He had to wait until 2007 to get a chance to move up the ladder, when a somewhat trepidatious Cameron selected him as the Conservative candidate for London mayor. Johnson surprised everybody by storming to victory over Labour's Ken Livingstone, who had looked unbeatable, and winning again four years later.
As mayor, Mr Johnson scrapped the unpopular "bendy buses", implemented a bike hire scheme (colloquially known to Londoners as "Boris bikes") and oversaw arrangements for the 2012 London Olympics - leading to one of the more infamous images of his political career, as he dangled from a zip wire gamely waving a pair of union flags.
In early 2016, he returned to Parliament as MP for Uxbridge and South Ruislip, with his sights set on the top job, and a major dilemma. David Cameron's decision to hold an EU referendum was a defining moment for the country, but also for the old friends and rivals.
Johnson's decision - after much agonising - to join forces with the pro-Brexit campaign came as a severe blow to Cameron's hopes of keeping the UK in the EU. But it was seen as a game-changing moment by the pro-Brexit campaign, run by tough-talking strategist Dominic Cummings, a man Cameron had once dismissed as a "career psychopath".
Johnson deployed all of his formidable campaigning skills, although he came in for heavy criticism for the claim - printed on the side of a battlebus - that the UK sent the EU £350m a week, which did not take into account the UK's rebate.
When his side emerged victorious, it was inevitable that Mr Johnson would throw his hat into the ring to replace the outgoing David Cameron as Conservative leader and prime minister.
However, his campaign was dramatically undermined when colleague and close friend Michael Gove withdrew support and decided to run for the leadership himself, saying he did not think Johnson was up to the job of prime minister. It was a brutal political assassination, met with dismay by Johnson's supporters.
Not for the first time, he was contemplating the end of his political career. Yet Theresa May, the eventual winner, appointed Johnson as foreign secretary.
His opponents had a field day trawling the archives for past gaffes and indiscretions, which included a 2007 newspaper column describing then US Secretary of State Hillary Clinton as looking like a "sadistic nurse in a mental hospital". He had also been forced to say sorry to Papua New Guinea over a reference to "orgies of cannibalism and chief-killing" and, going further back, had apologised for using an racial slur when writing about the Queen's tours of Commonwealth countries.
During his tenure at the Foreign Office, Johnson supported a tough line against Russia and expelled 23 diplomats following the poisoning of ex-spy Sergei Skripal. He also attracted criticism when he mistakenly said Nazanin Zaghari-Ratcliffe, the aid worker imprisoned in Iran, had been working as a journalist.
In 2018, he quit the cabinet in protest at Theresa May's Brexit deal, arguing it would lead Britain into "the status of a colony". He returned to his former highly paid job as a columnist for the Daily Telegraph, immediately running into controversy and accusations of Islamophobia after writing that Muslim women wearing burkas "look like letter boxes".
He remained a stern critic of May from the backbenches and, when she was forced to resign, he once again ran to be leader of his party. This time he was successful, building a commanding lead, not only with Conservative party members - with whom he had always been popular - but, critically, with Tory MPs.
His first few months in the role proved to be rocky as he struggled to govern with his party's at first tiny, then non-existent majority in the House of Commons.
He recruited Dominic Cummings - regarded with suspicion and seen as a troublemaker by many Conservatives - as his closest Downing Street aide. At Cummings' behest, he fought a guerrilla war against those MPs seeking to block his Brexit strategy, including some high-profile members of his own party.
'Get Brexit Done'
In an audacious and highly controversial move, later ruled unlawful by the Supreme Court, he attempted to prorogue, or suspend, Parliament, after his attempts to push through a Brexit deal faltered ahead of his own deadline of 31 October 2019.
After two failed attempts to get MPs to vote for a general election, he finally went to the country in December 2019, promising to "Get Brexit Done", a slogan dreamed up by Cummings.
The gamble paid off, and he was returned to power with the biggest Conservative majority since Margaret Thatcher's 1980s heyday. His Brexit deal was approved and on 31 January 2020 the UK left the EU.
It looked as though negotiating a trade deal with the EU would be his government's first key task - and Brexit his abiding legacy. But, within weeks, he was engulfed by an all-consuming crisis that few - least of all Mr Johnson - had seen coming: the coronavirus pandemic.
In a dramatic televised statement, he announced a national lockdown, a move unprecedented in peace time. The self-proclaimed libertarian and champion of the free market was now ordering the nation to stay in their homes, shutting down of huge of swathes of the UK economy and promising to spend billions on subsidising the wages of furloughed workers.
In April 2020, Johnson tested positive for Covid himself and spent three nights in intensive care. Downing Street played down the seriousness of his condition but when he was discharged, the PM admitted "it could have gone either way".
Less than three weeks later, his fiancee Carrie Symonds gave birth to their first child, named Wilfred Lawrie Nicholas Johnson - Nicholas in a tribute to the doctors who had treated him in hospital.
The twice-divorced prime minister married Ms Symonds at Westminster Cathedral at the end of May 2020. Their daughter Romy was born in December 2021.
Ms Symonds was a well-connected figure behind the scenes in the Conservative Party and her influence came to be resented by Mr Cummings and his close-knit team of former Vote Leave officials, who were now at the heart of the Downing Street machine.
As the UK emerged from the pandemic, Mr Johnson hailed the success of the UK's vaccine roll-out, which was the fastest in the developed world, helping the UK economy to re-open earlier than most. The mass unemployment predicted by many had also been avoided.
But his political problems were beginning to mount up.
Back in May 2020, he had stood by Dominic Cummings when he came under fire over a lockdown-busting trip to County Durham.
But Mr Cummings was forced out of Downing Street at the end of that year after losing a power struggle with Carrie Symonds, and now appeared determined to remove him from office. In an explosive appearance before a select committee, Mr Cummings said Mr Johnson was "unfit for the job" of prime minister, and that thousands of people had died needlessly because he had delayed lockdowns and ignored scientific advice.
Johnson was also under investigation over an expensive designer revamp of the Downing Street flat where he lived with his family, which was initially paid for by a Conservative donor. He was ultimately cleared by his ethics adviser, Lord Geidt, but the peer later rebuked his boss for having "insufficient" respect for his role, after new information came to light that had not been revealed to his inquiry. Lord Geidt would later quit the role in exasperation at the prime minister's attitude to ministerial standards.
Mr Johnson's political opponents, who had been unable to lay a glove on him at the height of the pandemic, were now making hay with accusations of sleaze and cronyism, and a prime minister with an apparently cavalier disregard for long-established rules of behaviour. This impression was not helped by Johnson's attempt to rewrite the disciplinary code for MPs to help his ally Owen Paterson, who was facing suspension for breaking lobbying rules. Johnson later confessed this had been a "total mistake".
But worse was to come in November 2021, when the Labour-supporting Daily Mirror accused Johnson of breaking Covid rules by attending parties in Downing Street when indoor mixing was banned. There was a further bombshell just over a week later when video footage emerged of Downing Street staff laughing and joking about holding a Christmas party.
Then the Daily Telegraph revealed that Downing Street staff had held booze-fuelled parties the night before the Duke of Edinburgh's funeral. Johnson later apologised to the Queen.
Johnson, his then-Chancellor Rishi Sunak and Carrie Johnson were among those fined by police over lockdown parties, while a damning report by senior civil servant Sue Gray laid bare a Downing Street culture of drunkenness and contempt for the rules.
Johnson did his best to sound contrite in public, telling MPs he had learned lessons and had launched a shake-up of backroom staff, but he continued to insist that he had not broken Covid rules on purpose.
He faced an investigation by a Commons committee into whether he had misled Parliament with his initial claims that there had been no parties in Downing Street.
The cabinet rallied round the prime minister, but a steadily growing band of backbench Conservatives, from different wings of the party had come to the conclusion that he had to go, amid rising public anger. Booing was heard when Johnson and his wife arrived for the Platinum Jubilee thanksgiving service at St Paul's Cathedral.
He survived a confidence motion in June 2022, despite 41% of his MPs voting against him. But a string of by-election defeats led MPs to fear he had become an electoral liability. The old magic, it seemed, was no longer working.
The final straw for many MPs was when ministers were sent out to defend the prime minister in a row over an MP facing allegations of sexual misconduct, armed with misleading information from Downing Street.
A mass walkout by ministers, including Chancellor Rishi Sunak, followed and after 48 hours of defiance, in which he repeatedly vowed to "get on with the job" of governing, he was finally forced to face up to reality.
The rollercoaster career of a politician who had defied political gravity for nearly four decades has finally come crashing to earth.