* Birth and early years:

Ukip was formed in 1993, by a Eurosceptic academic named Alan Sked, with the aim of securing the UK’s withdrawal from the European Union, drawing members from the Anti-Federalist League – a party set up in 1991 to fight the Maastricht Treaty.

It stood candidates at the 1997 election, but was overshadowed by James Goldsmith’s Referendum Party, which beat it in all but two seats contested by both parties.

Mr Sked resigned from the leadership soon afterwards, in protest at Ukip attracting members who “are racist and have been infected by the far-right” and warning it was ‘doomed”.

* First breakthrough:

Mr Goldsmith died soon after the 1997 election, creating political space for Ukip after his Referendum Party was dissolved. At the 1999 elections to the European Parliament, it won three seats – including a victory for Nigel Farage.

However, the party failed to score similar success at Westminster – fought under first-past-the-post, rather than the proportional representation in Brussels – at the elections in either 2001 (winning just 1.5 per cent of the vote) or 2005 (2.3 per cent).

* Takeover by Nigel Farage

In late 2004, it appeared the coming man was Robert Kilroy-Silk, a former Labour MP and famous as a chat-show host, who had been elected to the European Parliament.

However, after bitter clashes with the leadership, Mr Kilroy-Silk first resigned the Ukip whip at Brussels and then completely from Ukip in January 2005, branding it a “joke”, before briefly forming his own ill-fated party Veritas.

In April 2006, Mr Farage demanded an apology when David Cameron turned on Ukip, describing its members as “fruitcakes, loonies and closet racists”. In September, he was elected leader with 45 per cent of the vote - 20 per cent ahead of his nearest rival.

* Farage’s brush with death:

After exactly three years as leader, Mr Farage resigned to fight the Buckingham seat of Commons Speaker John Bercow at the 2010 election, subsequently coming third with 17 per cent of the vote.

During an election day stunt, his campaign plane flipped upside down and nosedived into a field. Police said he was “extremely lucky” to have walked away from the crash with only minor injuries and Mr Farage later said he thought he would die.

In August 2010, he triumphed in another leadership election, with more than 60 per cent of the vote. The outgoing leader, Lord Pearson welcomed his return, saying: “The Ukip crown returns to its rightful owner.”

* Ukip gains its first elected MPs:

At the 2014 European elections, Ukip scored a breathtaking success – becoming the first party in more than a century, other than Labour or the Conservatives, to win the most votes in a UK-wide poll, with 27.5 per cent. It now boasted 24 MEPs.

In the autumn, it finally gained representation at Westminster when first Douglas Carswell, and then Mark Reckless, defected from the Conservatives and won by-elections in Clacton and Rochester and Strood, respectively.

At the 2015 general election, Ukip won an extraordinary 13 per cent of the vote – beating the Liberal Democrats into fourth place – but was left with only one MP, Mr Carswell.

* The Holy Grail – the 2016 EU referendum

When the polls closed on 23 June 2016, Mr Farage predicted the Remain campaign would “edge it” – but, sensationally, was proved wrong a few hours later.

With Britain on the road out of the EU, Ukip had achieved its Holy Grail and had played a crucial role in doing so, its growing strength having pushed Mr Cameron into holding the referendum.

Ten days later, Mr Farage quit, saying: “I said I wanted my country back, now I want my life back”, insisting that – unlike his reversed resignation a year earlier – he was going for good. Ukip was left without its frontman, or the reason for its existence.

* Chaotic decline:

Incredibly, this was Ukip’s third leadership election in a year. Diane James was elected as Mr Farage’s successor but quit after 18 days, to be replaced by Paul Nuttall, in November, who vowed to win votes from Labour.

Steven Woolfe withdrew from the second contest after he was allegedly punched in the face by a fellow Ukip MEP in the European Parliament in Strasbourg, later describing the party as “ungovernable”.

In the 2017 local elections, UKIP lost all of the 145 seats it was defending – and, a month later, won a miserable 1.8 per cent of the vote and under 600,000 votes at the general election, triggering Mr Nuttall’s resignation

* The future:

Ukip stepped back from picking Anne Marie Waters, a notorious anti-Islam activist, as its new leader, saving the party from a threatened mass walk-out.