There are many ways of defeating a nation. One is by destroying its ‘values’. If they are liberal, it can be difficult to defend and preserve them in time of war. Modern terrorism, we are told, is a kind of war. The French republic is struggling to maintain its founding principles of liberty, equality and fraternity in the face of it. Other nations have been through the same experience, and quandary, in recent years. The United States was only half successful at keeping its ideals intact after 9/11. Norway was much admired for its determination to do better after the Utøya massacre of 2011.

In Britain, meanwhile, things don’t look good for the liberal way. The home secretary hopes shortly to bring in a measure – the Investigatory Powers Bill – that is bound to undermine many of our liberties. Other government measures threaten to close the doors to refugees. We are already the most surveilled country in the world, and the most unwelcoming in Europe to poor asylum seekers (though not to rich oligarchs).

The liberal principles under threat are supposed to have been central to Britain’s ‘national identity’ in days gone by – so far, at least, as the British mainland was concerned. The absence of a ‘political’ police, and of public surveillance of any kind, was crucial to most Britons’ self-regard for most of the 19th century and well into the 20th. In particular, it distinguished Britain from France. ‘They have an admirable police at Paris,’ the Earl of Dudley said in 1811 after a particularly horrible sequence of murders in East London. ‘But they pay for it dear enough. I had rather half-a-dozen people’s throats be cut in Ratcliffe Highway every three or four years than be subject to domiciliary visits, spies, and all the rest of Fouché’s contrivances.’ (Fouché was Napoleon’s police chief.) Most Victorians believed espionage was dishonourable, corruptible and destructive of stable and happy government, which rested on trust between rulers and ruled.

Britain’s policy of admitting any foreigner into Britain, even known terrorists, ran ‘spylessness’ a close second. Even bombs planted by foreign anarchists in London couldn’t shake that. Between 1823 and 1906, Britain had no laws to enable it effectively to refuse admission to foreign political refugees, or to extradite any who were here. Consequently, no immigrant was ever turned back or expelled. Some of them, early on, were even given government grants.

Happy days! Of course we can’t bring them back. (Though I never thought Victorian working conditions could come back, either.) But governments should be aware of what they’re doing when they stick CCTV cameras at every street corner, read our emails, and stop asylum seekers at Calais. They are undermining what were thought at one time to be two of Britain’s proudest ‘values’, the principles that defined it as a nation. I’m not sure that Conservatives – with their supposed respect for ‘British tradition’ – fully realise that. The Investigatory Powers Bill may be justified; I can't say. What I can say, however, as a historian, is that it undermines what we used to think of as crucial to our ‘national identity’. In this sense the terrorists might be said to have already won.