Boris Johnson’s unusual connection with the UK public first became obvious to the Labour Brexiter Gisela Stuart in May 2016 when they arrived in Cornwall on a major Vote Leave campaign event.

Surrounded by a media scrum, the backbench MPs descended together from the infamous red Vote Leave bus – adorned with a pledge to spend £350m a week on a post-Brexit NHS – and were handed top-heavy soft vanilla scoops on thin wafer cones.

Beastliness, buses and blunders: Boris Johnson's career in gaffes Read more

As they struggled through local traders and well wishers shouting the word “Boris”, they both realised that the ice creams were melting on a warm spring day quicker than they could be consumed.

“All I could think was ‘this is going to start dripping everywhere but it won’t look good if we throw them away’,” said Stuart, who was then the chair of the Vote Leave campaign.

At that moment, a mature, well dressed woman walked out of the crowd and headed for Johnson.

“This lady said ‘Mr Johnson, may I eat the rest of your ice cream for you?’,” said Stuart. Johnson handed the ice cream over and she devoured it.

Stuart, who campaigned with Tony Blair in 1997, said that kind of impromptu, giddy exchange was replicated over the six weeks of the campaign. He was an invaluable asset to Vote Leave, she said.

“How often have you seen a member of the public thrilled to be eating a politician’s half-eaten ice cream, and a politician so at ease that he would hand it over?” she said.

Facebook Twitter Pinterest Boris Johnson receives a kiss during a London mayoral campaign walkabout in Chingford east London, in April 2008. Photograph: Peter Macdiarmid/Getty Images

A Daily Telegraph newspaper columnist and former Spectator editor, Johnson was seen as a vote winner among Tory activists after retaining the mayoralty of London, traditionally a Labour-leaning city. He had returned to the backbenches as MP for Uxbridge and South Ruislip to search for a top job in government and was seen by many as a leader in waiting.

Fellow senior figures in the Vote Leave campaign said they had priced in Johnson’s weaknesses – that he could attract widespread condemnation for offensive gaffes and that he might struggle with detail.

It caused concern in Vote Leave’s headquarters – but little shock – when four days after that visit to Cornwall, Johnson gave an interview in which he compared the EU to Adolf Hitler.

“Napoleon, Hitler, various people tried this out, and it ends tragically. The EU is an attempt to do this by different methods,” Johnson told the Sunday Telegraph. Holocaust victims and war heroes stepped forward to condemn him.

Asked about the damage from this particular comparison, Bavarian-born Stuart paused, and then replied: “I have a long-standing piece of advice to politicians of all backgrounds – keep your references to the Third Reich to between 1939 and 45. They rarely listen to my advice. ”

Perhaps Johnson’s most controversial comments came a month earlier, when he wrote in a Daily Telegraph column that Barack Obama’s “part-Kenyan” heritage had driven him towards anti-British sentiment.

Following a plea from the then US president for the UK to stay in the EU, Johnson wrote that Obama had removed a bust of Winston Churchill from the Oval Office – a claim which had already been debunked by the Washington Post.

Facebook Twitter Pinterest Johnson’s wife, Marina Wheeler, helps as the then foreign secretary boards a rowing boat with the Czech Republic’s deputy foreign minister, Ivo Sramek. Photograph: Daniel Leal-Olivas/AFP/Getty Images

Regardless of the facts, Johnson wrote: “Some said it was a snub to Britain. Some said it was a symbol of the part-Kenyan president’s ancestral dislike of the British empire – of which Churchill had been such a fervent defender.”

Did such comments upset those in Vote Leave? Not really, according to one source who worked with him during the referendum campaign. “Johnson is expected to make risqué remarks from a bygone era. It probably helped to highlight the fact that we were ready face down our allies – not a bad position when you are arguing for sovereignty,” the source said.

A former confidante of Johnson said he was aware that he could get away with insults and borderline racist comments. “The bonhomie, the sub-PG Wodehouse schtick, the Have I Got News For You appearances, they have given him a protective force field. Otherwise unpalatable ideas that would kill off a fledgling political career can be discussed. He knows it,” the former colleague said.

Facebook Twitter Pinterest ‘Sub-PG Wodehouse schtick’ … Johnson with Paul Merton on BBC comedy show Have I Got News for You. Photograph: Video Grab/BBC

Johnson’s decision in February 2016 to campaign against his Eton school chum and rival David Cameron and back the campaign to leave was carefully calculated with an eye on a possible future move to become prime minister, one former aide said.

“He knew that either way, campaigning to leave would give him the support that a leader needs across the party’s members,” one Tory adviser said.

Having argued in favour of reforming the EU for many years while also being critical of its impositions on UK sovereignty, Johnson drew up three separate articles for his weekly Daily Telegraph column – two arguing to leave, and another to remain in the EU.

His remain article, which was later uncovered by the Sunday Times, concluded: “This is a market on our doorstep, ready for further exploitation by British firms. The membership fee seems rather small for all that access. Why are we so determined to turn our backs on it?”

Disclosure of the contradictory articles changed Cameron’s supporters’ views on Johnson. “Before, his decision to campaign to leave was seen as an act that was at least in part rooted in principle. After the remain article was uncovered, his decision was viewed as a cynical ploy to reach No 10. Grubby,” said one.

It was one of the leave articles that was published in the Daily Telegraph hours after Johnson had left his home in Islington, north London to declare that he was going to support exiting the EU.

Johnson’s decision to campaign to leave the EU rattled Cameron. The following day, the then prime minister released a statement to parliament saying “I have no other agenda than what is good for my country”, which was widely interpreted as a criticism of Johnson’s ambition.

Tensions between the two former Bullingdon Club members heightened again over the kind of relationship the UK could have with the EU after Brexit.

Cameron ridiculed Johnson’s recent conversion to a Canada-style Brexit model having previously been in favour of a Norway-style deal in which the UK would still pay money to the EU.

“They [the Vote Leave campaign] are literally making it up as they go along,” the then prime minister said.

“They are rolling the dice, they are taking a risk and they are taking a risk with people’s jobs, taking a risk with families’ finances.”

One of the problems facing Cameron and the official Stronger In campaign was Johnson’s untouchability in the eyes of the public.

Facebook Twitter Pinterest David Cameron and Johnson on the campaign trail in 2014. Photograph: Stefan Rousseau/PA

Focus groups showed that he was not judged on the same criteria as other politicians, particularly among undecided voters.

Boris Johnson's support for EU revealed in Leon Brittan letter Read more

According to Ryan Coetzee, the director of strategy for the campaign to remain in the EU, Johnson was judged “as a celebrity, not a leader” – a clever, ambitious actor. “Some take him seriously, some don’t but all of them discount his blunders and gaffs [sic] with ‘But that’s Boris’. He’s seen as fake but cleverly so,” Coetzee wrote in a memo to staff in May 2016.

On the morning of 24 June, after the referendum result had become clear, Cameron dramatically resigned in front of cameras in Downing Street, sparking a leadership race in which Johnson was the clear favourite.

An hour later, Johnson appeared at a news conference in Vote Leave’s offices across the river from the Houses of Parliament.

Johnson looked pale and stunned as he attempted to reassure the markets with a sombre speech. “I believe the British people have spoken up for democracy in Britain and across Europe and we can be proud of the result,” he said.

Those who worked with him on the campaign say he played a crucial role in the victory, a role which was very much front of house – at press conferences, campaign events and TV debates.

Facebook Twitter Pinterest Johnson yawns in the early hours after winning the Henley seat for the Conservatives in 2001. Photograph: Tim Ockenden/PA

Gisela Stuart, who partnered Johnson in ITN’s EU television debate vs Amber Rudd, Angela Eagle and Nicola Sturgeon, said: “Once you had him in the room preparing for this debate he totally and utterly engaged with the task in hand. There was no hint of a prima donna.”

Doubts remain over whether Johnson is willing or able to involve himself in detailed discussions around policy and strategy.

Insiders said that he very rarely contributed in the office, happy to leave those conversations to the likes of Michael Gove, Matthew Elliott and Dominic Cummings.

Critics from his own party believe his failure to get involved in the detail reinforces suspicions that he is incapable of serious political interventions.

Sir Alan Duncan, the foreign office minister and a noted critic of Johnson, told the Guardian: “It does appear that he is happiest when he is hanging on a zip wire of some sort, waving little flags, while others do the real work.”