Brexit would not hamper the UK's spies, a former head of MI6 has insisted as Home Secretary Theresa May said being a member of the European Union helped "enhance" security.
Former Secret Intelligence Service chief Sir Richard Dearlove said getting out of the EU's free movement rules could boost security.
He also suggested that there were "vastly varying levels of professionalism in intelligence and security" across the EU's 28 member states, hinting some of them leaked like "colanders".
But his comments were contradicted by Mrs May and Defence Secretary Michael Fallon, who stressed the importance of cross-border co-operation with EU partners.
Writing in Prospect magazine Sir Richard said: "Whether one is an enthusiastic European or not, the truth about Brexit from a national security perspective is that the cost to Britain would be low.
"Brexit would bring two potentially important security gains: the ability to dump the European Convention on Human Rights - remember the difficulty of extraditing the extremist Abu Hamza of the Finsbury Park Mosque - and, more importantly, greater control over immigration from the European Union."
The European Convention on Human Rights is not an EU creation, instead it covers the Council of Europe members.
Sir Richard said "few would notice" the loss of the European Arrest Warrant, which has been highlighted as an important factor by the Remain camp.
"Britain is Europe's leader in intelligence and security matters and gives much more than it gets in return," he said. "It is difficult to imagine any of the other EU members ending the relationships they already enjoy with the UK.
"Furthermore, counter-terrorist and counter-espionage liaison between democratic allies is driven as much by moral considerations as by political ones."
If a German intelligence agency learned of a plot targeting London it "is certainly not going to withhold the intelligence from MI5 simply because the UK is not an EU member".
The former "C" added that the current European intelligence and security bodies were "of little conseqeunce" and "are generally speaking little more than forums for the exchange of analysis and views".
"With the exception of Europol, these bodies have no operational capacity and with 28 members of vastly varying levels of professionalism in intelligence and security, the convoy must accommodate the slowest and leakiest of the ships of state," he said.
"The larger powers cannot put their best intelligence material into such colanders."
He added: "Would Brexit damage our defence and intelligence relationship with the United States, which outweighs anything European by many factors of 10? I conclude confidently that no, it would not."
But Mrs May told MPs "there are a number of mechanisms that we are part of within the EU that do enhance our security".
And Defence Secretary Michael Fallon told Channel 4 News he did not accept Sir Richard's analysis: "The fact is, across Europe we do have these mechanisms now for sharing flight information, sharing intelligence about terrorists; movements, swapping data about them that enable all intelligence services across Europe to pool their efforts to try to keep a tab on them."
He added: "What is very clear to me as the Defence Secretary charged with helping to keep this country safe ... is that we should not be leaving international organisations or intelligence-sharing partnerships, that would be exactly the wrong thing to do.
"On the contrary, when you are faced with a terrorist threat we should be sharing as much information as possible and we should be coming to the aid of our allies and friends rather than walking out on them."