Even for a maverick politician like Boris Johnson, backing Brexit four years ago was a huge gamble. But as Britain prepares to leave the European Union next week, it has paid off spectacularly.
The Conservative leader remains a divisive figure, hailed by many for his optimism and humour, accused by others of Trump-style populism and a blatant disregard for the truth.
But his name will be written in the history books for leading the campaign for Brexit in the 2016 EU referendum, and then, as prime minister, finally making it happen.
Negotiating a new trade deal with Brussels is likely to be an even greater challenge, but for now, the former London mayor is riding high.
For a man who as a child wanted to be “world king”, this moment of triumph has been a long time coming.
Alexander Boris de Pfeffel Johnson was born in New York in 1964 into a high-achieving family.
He spent his early years in Brussels, where his father worked for the EU, then attended the elite Eton school in England before studying classics at Oxford University.
He first worked as a journalist for The Times, where he was sacked for making up a quote, and moved on to become Brussels correspondent for the right-wing Daily Telegraph newspaper.
There he made his name by writing about “Euro-myths” — exaggerated claims about the EU.
He came to public prominence in the 1990s as a guest panellist on a satirical television show, where his eccentric and self-deprecating wit made him a national figure known just as “Boris”.
His first few years in politics did not go smoothly — in 2004, he was sacked from the Conservatives’ shadow cabinet for lying about an extra-marital affair.
But in 2008 he was elected mayor of multicultural, Labour-voting London, an achievement commentators put down to his unconventional style.
Johnson is not like other politicians, with his messy blond hair, jokey style and willingness to make himself look ridiculous — notably once getting stuck on a zip wire brandishing British flags.
He also differed from many of his Conservative colleagues with his pro-migration and socially liberal views, which resonated in London.
However, he has faced accusations of prejudice in his news columns over the years, describing gay men as “bumboys” and black African Commonwealth citizens as “piccaninnies”.
As recently as 2018, he drew criticism for writing that Muslim women in the full veil looked like “letterboxes”, even while he argued that they should be free to wear what they want.
But Johnson rejects accusations of racism, while supporters say he simply likes to stir things up.
In last month’s snap general election, he also proved he could still appeal to a broad range of voters by securing the Conservatives’ best result since the 1980s heyday of Margaret Thatcher.
With his promise to “Get Brexit Done”, be tough on law and order and invest in public services, he took back working-class seats that his party had not held for decades.
Johnson is known for his colourful private life. He is twice married, is believed to have five children — one from an affair — and currently lives with his girlfriend in Downing Street.
But his celebrity status has allowed him to shrug off scandals that would have destroyed many others.
More damaging have been questions about his competence, with a two-year stint as foreign minister after Brexit widely viewed as underwhelming.
The family of Nazanin Zaghari-Ratcliffe, a British-Iranian woman held in Tehran for alleged sedition, say he jeopardised her case by misdescribing her job.
After becoming prime minister in July last year, however, he defied his critics by renegotiating the terms of Brexit that MPs had rejected three times.
“Those who did not take him seriously were wrong,” French President Emmanuel Macron said at the time.
Johnson still stands accused of brushing over the difficulties of untangling Britain’s EU membership, but dismisses his critics as “doomsters”.
He may face his most difficult task yet in negotiating a new trading relationship with Brussels, as well as with the United States.
And with the EU exit secured, and a bulging in-tray of domestic issues, the prime minister must now show he can deliver more than Brexit.