LONDON/BERLIN (Reuters) - Britain and the European Union must retain close security ties after Brexit to foil Islamic State militant attacks and counter Russia’s “pernicious” attempts to subvert Western democracies, the head of Britain’s domestic spy agency said on Monday.

Director General of MI5 Andrew Parker looks on, as he delivers a speech in central London, on the security threat facing Britain October 17, 2017. REUTERS/Stefan Rousseau/Pool - RC17A92C34E0

As one of Europe’s leading intelligence powers, Britain is seeking a new security pact with the bloc to ensure its continued access to secrets from major EU countries as it seeks to clinch a broader Brexit deal.

In the first public speech outside Britain by a serving head of MI5, Andrew Parker told an event in Berlin hosted by Germany’s BfV domestic intelligence service that Islamic State militants are plotting “devastating and more complex attacks”.

Parker said that while Britain was set to leave the EU next year, its three main intelligence agencies - MI5, the MI6 foreign spy service and the GCHQ eavesdropping agency - were united in wanting to continue cooperation with EU member states.

“We must not risk the loss of mutual capability or weakening of collective effort across Europe,” Parker said, adding that he hoped for a comprehensive UK-EU post-Brexit security agreement.

“I don’t do politics but it is of course political arrangements, laws and treaties that permit or constrain what we can do together as agencies protecting our countries and Europe.”

MI5, established in 1909 to counter German espionage ahead of World War One, is tasked with protecting British national security and so takes the lead, along with the police, in countering militant attacks.

Britain suffered four deadly militant attacks last year that killed 36 people, the deadliest spate since the London “7/7” bombings of July 2005. These included a suicide bombing at a pop concert in Manchester on May 22 in which 22 people were killed.

Parker said Britain had thwarted 12 plots since March 2017, bringing the total number of disrupted attacks since 2013 to 25.

He praised the Counter-Terrorism Group (CTG), which groups all 28 European Union countries, Switzerland and Norway, for its exchange of intelligence.

“ISOLATED PARIAH”

Beside the threat from militant Islamists, including Islamic State operating in Syria and Iraq, Parker described Russia as a hostile state which was seeking to undermine the West, though he said he had no argument with the Russian people and that he had once studied Russian.

Russia under President Vladimir Putin, he said, had sought to regain the clout it lost after the fall of the Soviet Union in 1991 by carrying out “aggressive and pernicious actions” with its military and intelligence services.

Parker listed Russia’s annexation of Crimea from Ukraine in 2014, Russian meddling in the U.S. and French presidential elections, a coup attempt in Montenegro and cyber attacks against the West as examples of what he called the Kremlin’s unacceptable behaviour.

“Instead of becoming a respected great nation it risks becoming a more isolated pariah,” Parker said.

Britain blames Russia for the poisoning of Sergei Skripal, a former colonel in Russian military intelligence who betrayed dozens of agents to Britain’s MI6 foreign spy service. Skripal and his daughter Yulia were found unconscious on a bench in the cathedral city of Salisbury on March 4.

Britain said the Skripals were attacked with a military-grade nerve agent from the Novichok group of poisons, developed by the Soviet Union in the 1970s and ‘80s.

Moscow denied any involvement in the first known use of an offensive nerve agent on European soil since World War Two, though the attack sparked the biggest Western expulsion of Russian diplomats since the height of the Cold War.

Russian officials suggested Britain had carried out the attack to stoke anti-Russian hysteria.

Hans-Georg Maassen, head of Germany’s BfV domestic intelligence agency, said Moscow was behind a series of cyber attacks carried out by a Russian hacking group called APT28.

MI5’s Parker said Russia had sowed large-scale disinformation in an attempt to divide the West.

“Bare-faced lying seems to be the default mode, coupled with ridicule of critics,” Parker said.

“The Russian state’s now well-practised doctrine of blending media manipulation, social media disinformation and distortion along with new and old forms of espionage, and high-levels of cyber attacks, military force and criminal thuggery is what is meant these days by the term ‘hybrid threats’.”