Originally envisaged as a means of settling the long-standing divisions over Europe in his own party, Cameron called a Remain/Leave referendum for June 23 this year.
It was a gamble that was to backfire spectacularly with the electorate defying his call to Remain in the EU and a vote to Leave which put the prospect of a second Scottish independence referendum back on the table.
The months leading up to 23 June saw a bitterly fought campaign which was notable for its blue-on-blue attacks and the unpleasantness of much of the rhetoric.
With former mayor of London Boris Johnson “wobbling like a wonky shopping trolley” when it came to his own position on the EU, he was to eventually plump for Brexit – a decision that added to the momentum of the Leave campaign.
With his fellow Tory Brexiteers – among them Liam Fox and Michael Gove – Johnson led a controversial campaign urging people to “take back control” of their country.
Claims that Brexit would result in a £350-million-a-week bonanza for the NHS were emblazoned across the Leave battle bus.
The windfall was supposed to come from the savings in EU contributions and was hotly disputed by the Remain side, which pointed out that the £350m was a gross figure which took no account of the EU money which comes back to the UK in the form of farm subsidies and research grants, or the rebate negotiated by Margaret Thatcher in 1984.
Later Ukip leader Nigel Farage was to admit that basing the campaign on this number had been a “mistake”. But as the Remain side faced criticism for running “Project Fear” based on dire economic warnings of the consequences of quitting the EU single market, things hit a new low.
With migration and free movement of labour across the EU proving the most emotive issue of the campaign, Farage unveiled a poster that was condemned and even reported to the police on the grounds that it incited racial hatred.
It showed a long queue of mostly non-white migrants and refugees captioned with the slogan “Breaking Point: The EU has failed us all”.
Amid the rancour there was also terrible tragedy. A week before the vote, the Labour MP and mother of two, Jo Cox, was murdered by white supremacist Thomas Mair. Mair, who has since been imprisoned for life, shouted “Britain first, this is for Britain” when he shot and stabbed the 41-year-old Remain campaigner. It was a killing that shocked the nation.
When the UK finally voted, the polls were on a knife edge and Cameron’s career was in the balance. Then, for the prime minister, the unthinkable happened. His gamble to hold a referendum misfired and the UK voted 52 per cent to 48 per cent to leave the EU.
The people had rejected the prime minister’s plea to retain EU membership as well as his efforts to renegotiate the UK’s deal with the political bloc.
Farage was triumphant, but for Cameron the result was a disaster. His position as the occupant of No 10 Downing Street was no longer tenable. So it was that the votes of more than 17 million people forced Cameron to resign on the morning of his defeat. An emotional leader brought an end to his six years in the top job on the steps of Downing Street beside his wife Samantha and their children.
Cameron’s resignation triggered a battle for the succession, which made the activities of Niccolò Machiavelli look like something out of a kindergarten.
It has been assumed that Johnson would assume the mantel of Cameron, who had been a rival of his since their Eton and Oxford University days.
But Johnson seemed strangely unforthcoming and it was impossible to escape the conclusion that the Brexiteers had been caught on the hop. There were strong suspicions that their figurehead was not a true Brexit believer and had only been motivated to join the Leave side to further his own ambitions.
As the country waited for Johnson to make his pitch for the leadership, his fellow Brexiteer, Michael Gove, took matters into his own hands in the most sensational fashion. Gove made an intervention that was to become variously known as the cuckoo nest plot or, the stab in the back. It was an act, which one Tory described as “breathtaking treachery”.
Johnson’s close ally in the Brexit campaign, had privately come to the conclusion that the former London mayor was not prime ministerial material and did not have the stomach to carry through with Brexit.
Gove’s solution was to stitch him up. Just a couple of hours before Johnson was to formally launch his leadership bid, he learned that Gove intended to stand against him in the contest.
With the support of Tory MPs ebbing away from him thanks to Gove’s decision to throw his hat into the ring, Johnson knew the game was up. Instead of announcing his intention to stand he used what was supposed to be his leadership launch to tell the world he was ditching his Downing Street ambitions. It was a hugely dramatic development.
Quietly in the background was the former home secretary, Theresa May, a politician of ambition who had come out for a Remain vote but had been noticeably sotto voce during the campaign.
With Johnson out of the equation, the Conservatives were originally looking at a five-horse race with Gove pitted against May, Stephen Crabb, Liam Fox and Andrea Leadsom.
Fox was eliminated on the first ballot and Crabb withdrew. The next round of voting was enough to despatch Gove, leaving Leadsom against May. But Leadsom, who had been a prominent Leave campaigner, was shaken by the reaction to her suggestion in a newspaper interview that the fact that she was a mother gave her a greater stake in society than May, prompting her to withdraw from the contest and leave the path clear for present Prime Minister.
Meanwhile, as uncertainty gripped Westminster, Nicola Sturgeon attempted to seize the initiative. Having argued for EU membership, the SNP leader made much of the fact that 62 per cent of Scots had voted to stay.
She embarked on a trip to woo European leaders as she developed a strategy to protect Scotland’s place in the EU. The strategy which will be fleshed out this week had maintaining links with the single market at its heart.
One strand of Sturgeon’s plan has been to explore the possibility of Scotland staying within the EU while remaining within the UK – a proposal that has been dismissed by other countries and EU experts.
Another has been to put a second Scottish independence referendum on the table, laying down legislation that would enable her to call another vote before the UK leaves the EU.
Shortly after the Leave vote, Sturgeon said she thought it was “highly likely” that indyref2 was on its way – a statement which has raised the expectations of her independence supporters.
But with backing for independence slipping in the opinion polls and the oil price and Brexit making for a hugely challenging economic outlook, Sturgeon is aware that calling a second vote is enormously risky for her.
As David Cameron has shown, one of the consequences of losing a referendum is to lose your political career.
As we head into 2017, there are still so many imponderables arising from the Brexit vote.
May has proclaimed that “Brexit means Brexit”, a phrase that makes a handy sound bite but is utterly meaningless.
Of course, the truth is that nobody really knows what it means. Will it be “hard” or “soft”? What sort of relationship will the UK have with the single market and what are the implications for immigration of untangling Britain from decades of European legislation? Even the Article 50 process for leaving is mired in uncertainty.
The UK government’s plan is to use the Royal Prerogative to trigger Brexit. That, however, has been challenged in the courts by the campaigner Gina Miller. In the High Court, Miller won her argument that the prime minister must seek MPs’ approval for Article 50.
The UK government has since appealed to the Supreme Court in an attempt to overturn the judgement. The country is waiting for the 11 Supreme Court judges to deliver their verdict, which is expected early in the New Year.
After 2016’s Brexit political earthquake, tremors are still reverberating across the political landscape and will continue to do so for months and years to come.