MOST debate over Brexit has been about economics, trade and migration. But when David Cameron called the EU referendum in February he cited a new factor, asserting that membership made Britain safer. This week the prime minister went further, hinting that Brexit might increase the risk of conflict—and adding that, every time Britain turned its back on Europe, it had come to regret it.

In the past 25 years the EU has developed its common foreign and security policy. Examples of joint action include a common response to Iran’s nuclear ambitions and sanctions on Russia after it invaded Ukraine. Polls suggest that most voters support such co-operation. Sir Simon Fraser, a former head of the Foreign Office, believes that “Brexit would diminish Britain’s role in the world.” Some fear questions over its place on the UN Security Council, though Britain could veto any change.

Europe also has a role in security and intelligence co-operation. In March Sir Richard Dearlove, a former head of MI6, the foreign-intelligence service, argued that “the truth about Brexit from a national security perspective is that the cost to Britain would be low”. He set off a huge debate. Theresa May, the home secretary, pointing to the European Arrest Warrant and access to intelligence databases, insisted that being in the EU made Britain “more secure from crime and terrorism.” Pauline Neville-Jones, a former national security adviser, said Brexit would weaken border control and police co-operation.

Many of Sir Richard’s old colleagues have now weighed in. Lord Evans, a former boss of MI5, the security service, and John Sawers, another former head of MI6, wrote in the Sunday Times on May 8th that the EU “matters to our security” and that, by reducing data sharing, Brexit “could undermine our ability to protect ourselves”. On May 11th Eliza Manningham-Buller, another former MI5 boss, warned that “if we isolate ourselves we would lose influence…and put ourselves in greater peril.” Brexiteers reject this on three grounds. On foreign and defence policy, they insist that NATO is what matters and the EU could undermine it. Second, they say that, for intelligence, the key group is the “Five Eyes” linking Britain, America, Canada, Australia and New Zealand; and that post-Brexit it would be easy to replicate co-operation with Europe. And third, they say the EU is damaging not just because some members are unreliable but because the European Court of Justice (ECJ) can rule in security cases. This, plus migration, makes the EU bad for Britain’s safety. On the first point, the EU has civilian tools that NATO finds useful. Brexit also raises the risk of the EU wastefully opening its own military headquarters, a move long resisted by Britain. As for Five Eyes, all the other members want Britain to stay in the EU, partly because it makes it easier to co-operate with European colleagues. Nor are the two groups mutually exclusive: in practice, the security services work with foreign agencies all over the world. Third, Lady Manningham-Buller is clear that the ECJ has no jurisdiction in security matters, which are a national prerogative. The judges who have stopped the extradition of terrorists, for example, have been British or from the European Court of Human Rights, which is not part of the EU.