Every year, I deliver four lectures for London South Bank University (LSBU) on the law relating to terrorism. I began when I was director of Justice. The experience has been fascinating.

Westminster police

Westminster police

Source: Matthew Chattle REX/SHUTTERSTOCK

LSBU’s students are fantastic. In the best years, you get Muslims with roots in Bangladesh, Pakistan or Kashmir wanting to challenge facile generalisations about their communities. More generally, the law in this field provides a profound insight into the interplay of constitutional forces. Its state at any one point in time demonstrates clearly the balance of forces between the judiciary and the executive, parliamentary sovereignty and human rights. This tension has, at times, been fraught, but has ultimately delivered a sensible legislative framework.

As the Irish insurgency came to an end in the 1990s, a Conservative government asked Lord Lloyd to report on what should be the permanent legislative legacy. The Labour government duly enacted his recommendations in the Terrorism Act 2000. This was intended to be comprehensive and stand the test of time. It was based on Lord Lloyd’s principles of minimum powers beyond those in the normal criminal law, buttressed by safeguards such as an independent reviewer. His approach was not articulated particularly in terms of human rights – though he warned that legislation should be compatible with international obligations. However, the Terrorism Act was proportionate enough to survive as the basic legislation framework. Its provisions are largely compatible with the Human Rights Act 1998, which came into force in October 2000.

Human rights would have had an easier passage into our constitution if the events of 9/11 had not occurred. That sparked major legislative responses in both the US and the UK. The former got the Patriot Act and we got the Anti-Terrorism, Crime and Security Act 2001. Part IV of this allowed the indefinite detention of aliens who could not be deported because of the serious risk of death or injury. Justice took advice on the lawfulness of this provision from David Anderson QC. He wrote that, in the circumstances of the moment where the threat from al-Qaida was unclear, a court might be hesitant to find this approach incompatible with the European Convention on Human Rights, but that should be reviewed as time went by. Others took a more aggressive view. A challenge was launched and failed until it came, in what is now known universally as the ‘Belmarsh case’, before a House of Lords judicial committee chaired by Lord Bingham in 2004. This held that Part IV breached the convention’s non-discrimination provisions because it set up different rules for nationals and aliens. Three years had passed without serious government review.

The tension between courts and ministers was exacerbated by the London bombings in 2005. These confirmed the illogicality of maintaining draconian powers directed only at foreigners but led ministers to demand more. A political storm erupted as Tony Blair famously announced that ‘the rules of the game have changed’. Actually, of course, they had not. Nor did they, as the government lost a stream of cases where government forays into civil liberties were halted by the courts in relation to, for example, evidence obtained by torture; various forms of control orders; and London-wide indefinite powers of stop and search without cause. From time to time, it was politicians that led the defence of well-established liberties – chief among them, to his enormous credit, Brexit minister David Davis. Remember the battles for 90 days (Blair), 42 (Brown), where disproportionate requests for powers to detain without charge were eventually cut to what is now a 14-day maximum? The police, it seems, can cope within the current limit perfectly well. Anderson, until recently the statutory reviewer of terrorism legislation, reported in 2015 that only four people were held beyond a week.

Anderson represents the best in the current state of law and practice. His recently appointed successor, Max Hill QC, pays tribute on the independent reviewer’s website to how ‘he led the way in engaging with all sides in national and international discussion about terrorism’. The balance in Anderson’s original advice has been reflected more generally in his approach as reviewer. There was no clamour for greater powers after last month’s attack on parliament. Anderson’s consensus-building must take some credit for that.

Terrorism legislation will always be a place of great tension between security and human rights. Getting the right balance took the UK more than a decade of dialogue between judiciary and ministers. We should, however, be proud of the result: it shows how human rights can improve legislation and make it fairer. This is something particularly important to those like the LSBU students who are not, by any means, terrorists, but are sensitive to the grievances – real or imagined – of those who may be persuaded to go in that direction.

Roger Smith is visiting professor at London South Bank University and former director of human rights group Justice