Can it ever be lawful for British forces to kill would-be terrorists, as David Cameron today confirmed has happened in the case of two Britons fighting with Islamic State in Syria? Surely the rule of law demands that suspects be arrested, tried and imprisoned if found guilty by a court?

UK forces kill British Isis fighters in targeted drone strike on Syrian city Read more

English law allows a person to use such force as appears reasonable in self-defence or for the defence of others. And pre-emptive force may be used to ward off an imminent attack. So it would be lawful for the police or armed forces to shoot terrorists in London if that was the only way of stopping them setting off a bomb.

But what if the terrorists are abroad? Reyaad Khan was in the Raqqah area of Syria when he was killed in an RAF drone strike on 21 August. As the prime minister told MPs, he and Junaid Hussain – who was killed in an American air strike three days later – “were British nationals based in Syria who were involved in actively recruiting Isil [Isis] sympathisers and seeking to orchestrate specific and barbaric attacks against the west, including directing a number of planned terrorist attacks right here in Britain”.

There was, said Cameron, no other way of preventing Khan’s planned attacks.

The attorney general, Jeremy Wright, will have advised Cameron that article 51 of the United Nations charter preserves the “inherent right of individual … self-defence if an armed attack occurs against” a member state. Measures taken under this provision must be reported to the security council “immediately” – a requirement that seems to have been interpreted by the government as meaning “after two weeks”.

Was the UK under an armed attack? Cameron said “there was clear evidence of the individuals in question planning and directing armed attacks against the UK”. In English law, you don’t have to wait for the aggressor to shoot first – and the same principle is accepted in international law. The government does not seem to be relying on the more questionable doctrine of anticipatory self-defence or pre-emptive strikes.

All states agree that self-defence must be necessary and proportionate. These requirements can be traced back to the Caroline incident in 1837, which involved a pre-emptive raid by British forces in Canada on a steamboat manned by Canadian rebels who were planning an attack from the US. Cameron was at pains to point out that the attack on Kahn and his Isis associates was timed to avoid any civilian casualties.

Even so, two other people who were travelling in the same vehicle as Khan were killed at the same time. One was Rahul Amin, who was a UK national. The other has not been named. Cameron said that both were Isis fighters though – unlike Hussain – they were not accused of planning specific attacks.

It is obviously harder to justify the attacks on the two men travelling with Khan than it is to justify killing Khan himself. On the other hand, if they were Isis fighters then they should have known that Khan was a likely target and that they would be at risk by travelling with him. If Khan had been hiding in a village or even a large compound, it would have been disproportionate to bomb the entire area. But attacking a vehicle containing Isis fighters would be seen by many as a proportionate response to the threat Khan posed.

Critics say that Cameron should have sought parliamentary approval before launching air strikes. Clearly, that would have jeopardised the operation, even if parliament had been sitting in August. Though there may now be a convention that parliament is consulted ahead of military action, it is not a legal requirement – whether or not the potential targets are UK citizens.

On the facts as we know them, this unprecedented attack on British would-be terrorists in Syria appears to be within the law. The attorney general, we are told, “was clear there would be a clear legal basis for action in international law”. We are unlikely to see the full text of his advice because some of the details are likely to be highly classified. But we are entitled to expect the government to publish a summary, not least because the convention that legal advice on such matters is confidential seems no longer to be observed by ministers themselves.

So the only remaining question is whether the drone strike on Khan and those with him was morally justified. On this, I am with Cameron. As he said, his first duty is to keep the British people safe. “There was a terrorist directing murder on our streets and no other means to stop him,” the prime minister said.

And I don’t suppose that Khan himself would have disagreed. If he was waging war on British troops and civilians, he can hardly complain the UK’s armed forces were one step ahead of him.