Niall Ferguson’s belated decision to back Brexit has aroused a lot of mockery today. Unkind souls are presenting him as a historian in a muddle, but for followers of his writing his new pro-Brexit stance really isn’t so surprising. He says that he had been inclined to support David Cameron and George Osborne, his friends. A noble reason. But it led him into making arguments inconsistent with those that he has been making most of his career. “Brexit woke me up, and reminded me that I needed to pay much more attention to what the non-elite majority of voters were feeling. And on the issue of EU performance, I think they were right," he said (see video, above). In backing Remain, Niall Ferguson was doing a very un-Ferguson thing.

His last book, The Great Degeneration, could have been a manifesto for Brexit. Its theme is the importance of institutions ("the rule of law, credible monetary regimes, transparent fiscal systems and incorrupt bureaucracies") and the danger that emerges when their decay is tolerated. 'The rule of law has many enemies,' he writes. 'But among its most dangerous foes are the authors of very long and convoluted laws.' EU directives, anyone? The subversion of the English common law tradition by Brussels diktats offered a case study of the problem outlined in that book. 'AV Dicey pointed out in 1885 that the English rule of law was the result of a slow, incremental process of judicial decision-making in the common law courts, based in large measure on precedents,' he wrote. 'There were no "grand declarations of principle," just the interplay of judicial memory and statutory innovations by Parliament.' So when British law had to conform to the EU-style declaration of rights, the results were awful. How much does this matter? Different people have different answers - but Ferguson would tell you that the health of legal institutions is absolutely critical. One of the most potent arguments for Brexit was that it would be a vote to 'live under our own laws'.

Ferguson traces the success of modern Britain to the Glorious Revolution of 1688, which subordinated the monarch to parliament and allowed for the creation of strong and independent institutions. The ability to raise money, innovate, form corporations – all protected by law and free from random raids by the government – explains Britain's rapid industrialisation and rise to power. In Empire (2003) he writes about how the British introduced such institutions to a quarter of the world, with beneficial effects. In The Great Degeneration (2014) he quotes Adam Smith describing the sorry condition of 'stationary state' – i.e., a stagnating entity. One that has allowed its ‘laws and institutions’ to atrophy. Of which European Union is, surely, a rather conspicuous example.

Ferguson is also no fan of large, homogenising empires. In Civilization (2011), he explains that Europe pulled ahead of medieval China because our continent was broken up into “literally hundreds of competing states” whereas East Asia was (in political terms at least) a “vast monochrome blanket” with an emperor’s diktats upheld everywhere. Things are better when states do things their own way, he argued, which renders them better able to cooperate and compete. The Brexit argument – that Britain can be a globally-minded nation, engaged with its neighbours in the world but living under its own laws – is entirely in line with Ferguson’s view of the world.

The theme running throughout all of Ferguson’s work is is the case for 'applied history' which he defines as 'the study of the past with a view to understanding the present better'. And his study of the past persuaded him that it is the strength of institutions that determines the success or failure of countries. The EU referendum asked if Britain should back away from a visibly failing institution that was expanding its writ over us. Lord Denning described European law as a 'tidal wave bringing down our sea walls and flowing inland over our fields and houses'. That's the kind of quote that ought to have featured in a European chapter of The Great Degeneration.

Now, you either buy into these arguments - or you don't. But those who do would have had no doubt about how to vote on 23 June, and the importance of retrieving sovereignty from a failing institution. The leading article in The Spectator, which made the case for Brexit, used Fergusonian logic. Even if Ferguson himself had arrived at a different conclusion.

So what was going on? 'My mistake was uncritically defending Cameron and Osborne instead of listening to people in pubs,' he said on Twitter. His point about pubs might sound flippant, but behind it lies a more serious point. Back in May, when no one gave Donald Trump a chance of winning the election, Ferguson delivered a lecture in Sydney where warned the audience not to believe the experts who dissed The Donald. Instead, he said, you should listen to people in pubs - or, in his case, security guards. Here's his explanation:-

“ "I have a curious advantage over professional commentators. Because of my wife’s courage, and her work on the problem of Islamic extremism, she – and therefore I – also require security. It turned out that the guys providing our security were a better guide to the US election than any of the professional commentators on CNN. They got, early on, the significance of Trump. 'He tells it like it is.' I remember that phrase from early on. 'He’s gonna shake things up'. That’s really what it’s all about. The policy detail, immigration changes, even the wall, is much less important to the guys that support him than the broad idea that he’s not this damned corrupt political establishment that was to blame for the crisis."

Perhaps the bigger question is: why did he admit that he was wrong?Beacsue Ferguson is that rare thing: a historian who is mindful that experts get it wrong. He makes no claim on infallibility himself. He loathes the way that pundits never admit to errors and box themselves in to the wrong positions. His approach is rather unusual. He explained it in Sydney:-

“ I have established a practice of assessing every prediction that I make. What I’ve learnt is that one needs to be extremely rigorous about identifying what one got wrong. If one has made a predictive statement then, at the end of the year, look back and see how it looks. So I have become much more formal in the way that I assess my own performance when I am commenting on current events. But don’t let’s hold people to impossible standards.

He has made the headlines over Brexit because he believes in holding himself to account. He refers to backing Remain as the "great mistake of my career." It's novel approach in his line of work, certainly. But Niall Ferguson is nothing if not novel. He is admitting he got this wrong because he holds himself to a higher standard.

I started the year backing Remain, so I can see why people change their minds on this. You have tribalists on both sides. But Brexit was, to me, about a balance of risks - most of them unquantifiable. Would the EU ever reform? Would a Brexit vote lead to an immediate recession? Plenty economists argued that it would, but even they were guessing. We know a little more now - and when the facts change, people change their minds.

Ferguson doesn’t like to mince words. Once he decided that he'd back Cameron (and Remain) he fought as hard as he could. But it was obvious to anyone familiar with his work that he was, as he now admits, arguing for a cause without 'wholly believing in it'.

So I wouldn’t categorise Ferguson’s backing of Brexit as a U-turn. He took a temporary diversion from the line of argument he has been following throughout his career. A diversion explained by understandable personal loyalties and - by his own admission - a lack of exposure to British pubs. A reminder, for all of us, to spend more time in them.