DAVID Cameron famously said he wanted to avoid the EU referendum contest becoming a “Tory psychodrama”. He failed.

Since before the UK joined the sepia-tinted European Economic Community back in 1973 the Conservatives – and indeed Labour, albeit to a generally lesser degree – have psychologically tossed and turned about Britain’s strained relationship with our continental cousins.

When the EU referendum debate got under way proper, there was a fierce argument, particularly in Conservative circles, about which way Winston Churchill and Margaret Thatcher would have sided in today’s great debate.

The Tory psychodrama on Britain’s relationship with the Brussels bloc was previously laid bare during the government of John Major, whose crack at the premiership only came about after divisions over Europe finally ended the Iron Lady’s time in office.

Black Wednesday, the ERM, Maastricht, the “bastards” who were some of his own cabinet members all made Sir John’s time in Downing Street a painful and exasperating experience, which only ended when the public put him and his divided Tory government out of their misery in 1997.

William Hague took over but the psychodrama continued as the Yorkshire Eurosceptic spent the 2001 General Election campaign holding the Queen’s head between his finger and thumb, telling everyone, who would listen to vote Tory to save the pound. His mantra was “in Europe but not run by Europe”.

Another crushing defeat at the hands of Tony Blair’s New Labour saw the Conservative Bourbons learn nothing from experience and so they elected an even greater Europhiliac in Iain Duncan Smith. As the psychodrama continued, the internal divisions got to the Essex Scot, who told his party to “change or die”. Within a week, it opted for the former and ditched him.

Fellow Europhile Michael Howard filled in to steady the Tory boat and, in a desperate attempt to avoid a third successive defeat, decided to go for the lowest common denominator and played the immigration card. But even in the shadow of the after-effects of the misjudged Iraq war, Mr Blair romped home.

It was only with the election of the liberal Conservative David Cameron that the psychodrama seemed, for a while at least, to calm down as Britain had other things on its mind and struggled through the worst economic recession since the 1930s crash.

But as the country slowly recovered through the Coalition years, the seeping Tory wound, of whither Britain’s relationship with the EU, continued to fester as a new generation of anti-EU MPs increasingly raised the question and the rise of Ukip and its twin messages against the evils of Brussels bureaucracy and unrestricted immigration began to strike a chord with ordinary voters.

So Mr Cameron announced he would, after a generation or more of governments avoiding the question, put it to the people; In or Out. The beast had been unleashed.

The PM knew this was a gamble but he was confident it was one he could win. Intrinsically a Eurosceptic, nonetheless, his time in office convinced him that, despite its many flaws in terms of democratic accountability and sovereignty, the bottom line of enhancing economic prosperity meant it was better to be inside the EU and the single market than outside.

Mr Cameron’s big sell was that he would get a deal on reform from his 27 EU counterparts, which would form the basis of his referendum prospectus. The deal, therefore, would not be change, ie Brexit versus the status quo, but Brexit versus a new, improved relationship with the EU.

But while the PM got some concessions on welfare and sovereignty, it was not the fundamental change that his Europhile colleagues had wanted.

The die was cast and the battle ahead was not only going to be a difficult prospect for Mr Cameron politically but personally too, given that two of his closest friends, whose relationship with him stretched back years, Michael Gove and Boris Johnson, were so deeply Eurosceptical that they would inevitably be Outers; although the latter took longer to come to this position than the former.

The Tory leader, to avoid shattering his government, decided to suspend collective responsibility for the short campaign, which meant voters had the unusual prospect of seeing cabinet minister arguing against cabinet minister.

While the PM and his colleagues insisted the campaign would all be carried out in the most gentle and comradely fashion, as the days passed the rhetoric intensified and the tone lowered; to such an extent that Tory ministers were branding each other liars and questioning not only their judgement but even their sanity.

It was largely the blue-on-blue civil war that finally woke Labour up in the final fortnight, not so much to espouse the benefits of a workers’ Europe but more to warn about a Britain, divorced from the EU, governed by a right-wing cabal of Europhiles led by their head boy Boris Johnson.

The sentiment that, once the fighting was over, the factions would dust themselves down, link arms and walk, singing, off into the sunset and the new dawn beyond, looked increasingly impossible given the wounds inflicted in the Tory psychodrama.

Mr Cameron has insisted that, whatever the result, he would carry on regardless. But with a Brexit vote, it is difficult to see how the party leader, his authority shattered, could do so for very long.

And even with a Remain vote, the idea that the 70 or so anti-EU Tory MPs would keep quiet and allow their bruised and battered chief to continue as if nothing had happened, seems far-fetched.

With a working majority of just 16, this parliament would have been fraught anyway for the PM.

But with a Europhile faction snapping at his heels, making parliamentary life difficult and demanding all the time when Mr Cameron was going to go, the chances of a Conservative leadership election well before 2020 seems likely.

Just before polling day, Nigel Farage was asked what he would do if Remain won. The Ukip leader paused and noted how, after the 2014 Scottish independence result, the defeated SNP did rather well. Ukip, he suggested, could do exactly the same.

In other words, the question about Britain’s relationship with the EU will rumble on. The Tory and indeed the nation’s psychodrama will continue regardless.