Paul Nuttall has quit as Ukip’s leader, within hours of his party’s disastrous election performance, winning a puny two per cent of the vote.

He insisted he was “proud” of his party’s manifesto, which promised another crackdown on immigration, a bigger army and taking the axe to the “bloated” foreign aid budget.

But he said: “I am standing down today as the leader of Ukip with immediate effect.”

Mr Nuttall vowed that Ukip under his successor – to be in place by September – would continue to be a “straight talking” party that says “what everybody else is thinking”.

“If Ukip is to prosper, it must continue to be the outrider of British politics – the party that leads and does not follow,” he said.

The resignation comes after former leader Nigel Farage said he would have “no choice but to return to frontline politics” if Brexit was put at risk by a hung parliament.

Asked if he would return as leader, Mr Farage said: “Whether leading or playing a prominent role is perhaps a different question.”

He could not see the “historic victory” of the British people at last year's EU referendum be betrayed by the political class “and not fight back”, he added.

Mr Nuttall failed in his bid to win a Commons seat on Thursday, finishing a distant third in Brexit heartland Boston and Skegness behind the Tories.

It was the Ukip leader's sixth attempt to get into Parliament, having finished second behind Labour at a disastrous Stoke-on-Trent Central by-election earlier this year.

Ukip's share of the vote crashed by 26.1 per cent to 3,308 votes, while Labour increased its vote by 8.5 per cent to 10,699 and the Tories by 19.8 per cent to 27,271.

It mirrored Ukip’s fate across the country, with the party's vote share down to around 2 per cent nationally, splitting between Labour and the Conservatives.

At a news conference, Mr Nuttall said: “It is clear that Ukip requires a new focus, new ideas and a new energy - and it is there amongst out ranks.

“I think, regardless of the score last night, I have laid the foundations for the future in this General Election campaign but it will be for someone else to build on those.”

Asked about a future role for former leader Nigel Farage, Mr Nuttall said: "If Nigel Farage wants to come back, I would be more than happy to do a job swap. I'll take his slot on LBC [radio] and he can come back as leader of Ukip.”