Wearing hand-made Union Flag shoes, Nigel Farage was a star turn at a garden party on Sunday in the grounds of Hampton Court Palace.

Rupert Murdoch, Tory leadership contender Liam Fox, Labour luvvie Sir Patrick Stewart and the singer Lily Allen mingled at the party thrown by Evgeny Lebedev, who owns the London Evening Standard newspaper.

In a buoyant mood, and downing large gin and tonics, Farage gave no hint that he would announce the very next day that he was resigning as leader of Ukip.

Scroll down for video

ANDREW PIERCE: Wearing hand-made Union Flag shoes, Nigel Farage was a star turn at a garden party in the grounds of Hampton Court Palace - giving no hint that he would resign the very next day

The timing of his announcement yesterday was significant. A keen historian, he went on July 4 – American Independence Day. Immediately there was intense speculation about why he was going.

Was he ill? There were certainly rumours last year that he may have been ill, and he is prone to heavy drinking.

Was his marriage in crisis? He has admitted to at least one adulterous liaison in the past.

Yet it seems the answer is more prosaic. He’s had enough of frontline politics and wants a rest.

Even his closest friends were kept in the dark about Farage’s promise to his wife Kirsten, and their two young daughters, that he would stand down as leader of Ukip if Britain voted to Leave the EU.

‘During the referendum I said I wanted my country back... now I want my life back,’ Farage said yesterday.

Rupert Murdoch, Evgeny Lebedev and Farage in a photo tweeted by Lily Allen on Sunday

In truth, he never expected to win the referendum. Twice on the night the votes were being counted he conceded defeat.

He’s now planning to go to France to make a film about the centenary of the Battle of the Somme.

Later in the month, he will be a guest at the Republican Convention in the US. He’s likely to be asked to speak.

He will also sign up with a speaking agency in the US and one in London as he launches himself on the lucrative after-dinner speaking circuit. He will earn at least £20,000 a speech.

Farage will serve out the remaining two years of his term as an MEP, and will do everything he can to ensure that whoever becomes prime minister secures the best deal from the EU.

His departure means Ukip will seek to capitalise on its referendum victory without the leader who virtually single-handed turned it into the country’s third most popular party with almost four million votes, or 12.5 per cent, at the last general election.

He also presided over Ukip becoming the largest party in the European elections in Britain in 2014.

Once dismissed as ‘fruitcakes, loonies and closet racists’ by David Cameron, the Ukip vote at the last election was more than the Scottish Nationalists and Lib Dems combined, although it translated into only one Commons seat.

A friend of Farage said: ‘He’s leaving on a high. He’s finally achieved his ambition to get Britain out of the EU.

‘He’s also seen off David Cameron, who he can’t stand. He’s decided not to hang around.’

Of course, he resigned after the last general election – only to withdraw his resignation days later.

But this time he dismisses the idea of coming back. ‘I won’t be changing my mind again, I assure you. It’s for good this time,’ he says.

Having tried and failed seven times to become an MP, he appears now to have given up on his Westminster ambitions. ‘He’s finished running for Parliament. Being an MP is a horrible job, and he’s got more interesting things to do with his time,’ added the friend.

He’s unlikely to reject a peerage, however – although David Cameron, who detests him, is unlikely to offer him one.

He is a divisive figure, though, both in his own party and in the country. So there will be many in Ukip who will be glad to see the back of Farage.

On May 6, 2010 – the day of the general election, he was seriously injured when a light aircraft he was travelling in crashed after the Ukip banner it was towing became entangled in the tail

He’s never been a team player. He fell out with Douglas Carswell and Mark Reckless, the former Tory MPs, within days of them coming over to Ukip.

Suzanne Evans, one of the party’s most prominent women members, incurred the wrath of Farage after he began to suspect she was plotting to take his job, and is now suspended from the party.

For that reason, by announcing his departure yesterday Farage has ensured that Evans, whom he loathes, will be unable to enter the leadership race.

Stuart Wheeler, the spread-betting tycoon and former treasurer of the party who was instrumental in helping persuade the two Tory MPs to defect, also no longer speaks to Farage.

There was certainly intense nervousness in the Vote Leave team that Farage would damage their campaign during the referendum because he inspires such strong reactions in voters – either in support of or opposition to his views.

The Ukip poster of a queue of Slovenian migrants, with the slogan Breaking Point, was a case in point. Senior Tory and Labour politicians said the poster had echoes of Nazi propaganda.

In truth, he never expected to win the referendum. Twice on the night the votes were being counted he conceded defeat (pictured: Farage in 1999)

Farage, 52, was born and brought up in Kent and educated at one of England’s leading private schools, Dulwich College.

He eschewed university for a career in the City as a commodities trader. The atmosphere was laddish and politically incorrect – characteristics closely associated with Farage today.

Farage formed Ukip in 1993 and has been an MEP since 1999, the year he married his second wife, German-born Kirsten Mehr, two years after his first marriage ended in divorce

He survived a serious car accident at the age of 21 and was diagnosed with testicular cancer shortly afterwards, but made a full recovery. The nurse who cared for him after the crash, Grainne Hayes, became his first wife, and they now have two grown-up sons.

Despite supporting the Tories since school, he quit the party after John Major signed the Maastricht Treaty in 1992.

Farage formed Ukip in 1993 and has been an MEP since 1999, the year he married his second wife, German-born Kirsten Mehr, two years after his first marriage ended in divorce.

In 2006, Farage admitted to a one-night stand with a Latvian television reporter, Liga Howells, who was half his age. ‘I am not saying I am beyond stupidity, and yes I’ve made mistakes,’ he said.

On May 6, 2010 – the day of the general election, he was seriously injured when a light aircraft he was travelling in crashed after the Ukip banner it was towing became entangled in the tail.

His love life came to the fore again in 2014, when he had to deny allegations made in the European Parliament by Nikki Sinclaire, a former Ukip MEP, that he had both his second wife and a former mistress on the public payroll.

Sinclaire used a debate at the EU assembly to suggest Annabelle Fuller, a Ukip press officer, had been his mistress – a charge Miss Fuller vehemently denies.

Farage’s second wife is employed by him as a secretary on around £25,000 a year.

Now, Farage has decided to step aside as party leader after securing a historic victory against the odds in the referendum

But it is not in his private life that Nigel Farage has helped to change the course of British history.

If Ukip had not been so popular in the run-up to the 2015 election, David Cameron would not have been forced to offer an EU referendum as a sop to the right wing of the Conservative Party, as well as to many Tory voters.

European Commission President Jean-Claude Juncker kisses Nigel Farage, prior to a plenary session at the European Parliament on the outcome of the Brexit in Brussels, Belgium

Now, Farage has decided to step aside as party leader after securing a historic victory against the odds in the referendum.

He has raised the prospect of taking some role in negotiating Britain’s exit from the EU, saying he ‘might have something to give’.

As for Ukip’s MEPs, he says they will remain in the European Parliament until the UK leaves and their roles no longer exist, something he hopes would happen within two years.

He added: ‘The Ukippers will have been the turkeys who voted for Christmas.’

The departure of such a polarising leader also makes it easier for Ukip to target voters in Labour’s northern heartlands.

There are people in the Conservatives and Labour who believe that Ukip could, with the right leader, become the official Opposition, given that Jeremy Corbyn’s party is in such disarray.

The new leader is expected to be announced by early September. The two front-runners are the party’s immigration spokesman Steven Woolfe, an MEP for the North West, and Ukip deputy leader Paul Nuttall, who is also an MEP for the North West.

They both have strong links to the North, where Ukip will concentrate its campaign efforts.

Neither, though, is likely to generate the sort of media attention that Farage has enjoyed, with his flair for self-promotion and his insult-laden speeches in the European Parliament.