For years, Eurosceptics were derided as a band of fringe eccentrics on the margins of the Conservative Party and mainstream British politics.
When John Redwood challenged prime minister John Major for the Tory leadership in 1995, his supporters were mocked as the “barmy army” and “ward 8 of Broadmoor”.
But a quarter of a century on as the UK prepares to sever its final ties with the EU, the Eurosceptics are about to celebrate their ultimate triumph.
It is a struggle that had its roots in the bitter Commons battles of the early 1990s over the ratification of the Maastricht Treaty which created the modern European Union.
For months the likes of Iain Duncan Smith, Bernard Jenkin and Bill Cash were engaged in a form of parliamentary trench warfare as they regularly tested Mr (now Sir John) Major’s slender majority.
But even then, the battles were over resisting further European integration – the question of Britain’s membership of the club was simply not on the table in any meaningful way.
When the financier Sir James Goldsmith founded his Referendum Party to campaign for a public vote leaving the EU, it looked like the quixotic indulgence of an extremely wealthy man.
The resounding triumph of Tony Blair’s resolutely pro-Europe New Labour in the 1997 general election seemed simply to confirm that such ideas were destined for the dustbin of history.
A succession of Eurosceptic Tory leaders – William Hague, Mr Duncan Smith and Michael Howard – were unable to make any impact on the Labour ascendancy.
Ironically, the sea change was to happen under David Cameron – a Conservative leader who promised to stop “banging on” about Europe as he sought to regain the political centre ground.
But for all his commitment to a settlement based on membership of the EU but not the single currency, the 2010 general election saw a new generation of Eurosceptic Tories enter Westminster for the first time, including Jacob Rees-Mogg, Priti Patel and Steve Baker.
At the same time, Mr Cameron’s decision to enter coalition with the Liberal Democrats meant they were no longer the natural repository for voters disillusioned with the two main parties, who increasingly turned to a reinvigorated Ukip under Nigel Farage.
Suddenly the idea that Britain might leave the EU was no longer a fringe obsession but part of the mainstream political debate.
MPs such as David Davis – who had once whipped Tory MPs to back Mr Major over Maastricht – were coming round to the idea that a different future was possible.
In January 2013, under intense pressure from his own backbenches, Mr Cameron declared he was in favour of an in-out referendum on Britain’s EU membership.
When the Tories were returned to power in 2015 with an overall majority, it was with a mandate to renegotiate the terms of the UK’s membership and then put it to the public.
When Boris Johnson threw his lot in with the Brexiteers, the stage was set for the most momentous reversal in British politics since the Second World War.