A German national security agent has been arrested on suspicion of being an Islamist and disclosing sensitive information as part of a possible Isis-inspired terror plot.

The 51-year-old was a full-time employee of the Bundesamtes für Verfassungsschutz (BfV) – the German equivalent of MI5 – when he allegedly started using extremist chat sites under a fake name.

Security sources told Die Welt he was planning a bomb attack “in the name of Allah” on the intelligence agency’s headquarters in Cologne until he was discovered by a BfV informer who came across the internet threads last month.

The German suspect, who has a family and formerly worked at a bank, has been engaged in gathering intelligence on Islamist networks in Germany since April.

He converted to Islam two years ago and had made a pledge of allegiance to the Austrian Isis fighter Mohamed Mahmoud, Der Spiegel reported.

Mahmoud, who was jailed for supporting al-Qaeda and started a banned extremist organisation before being expelled from Germany, appeared in an Isis propaganda video calling for terror attacks in Europe last year.

Speaking in German, he ordered viewers to “pick up a big knife, go down to the streets and slaughter every infidel you encounter” before shooting a prisoner in the head.

Austrian Islamist Mohamed Mahmoud in an Isis propaganda video filmed in Palmyra (YouTube)

The BfV has not confirmed the pledge of allegiance or planned attack, saying no “evidence of a concrete risk to the safety of the BfV and its workers” had been established.He has been arrested and prosecutors in Düsseldorf are leading the investigation.

“The BfV has revealed a suspected Islamist among its staff,” a spokesperson told The Independent.

“He is accused of expressing Islamist sentiments on the internet under a false name and to have passed on internal information in online chats.

“Additionally, he offered to disseminate sensitive information about the BfV, which could lead to a threat to the office.”

The suspect, a lifelong German citizen, was only recently recruited and had been “inconspicuous” throughout the application and training process, officials said.

Terrorism in 2016: Terror attacks in Europe claimed by Isis Show all 9 1 /9 Terrorism in 2016: Terror attacks in Europe claimed by Isis Terrorism in 2016: Terror attacks in Europe claimed by Isis Policemen outside Rouen's cathedral during the funeral of Jacques Hamel, the priest who was killed in a church in Saint-Etienne-du-Rouvray in Normandy on 26 July during a hostage-taking claimed by Islamic State group Joel Saget/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis Two jihadists, both 19, slit Hamel's throat while he was celebrating mass in an attack that shocked France as well as the Catholic Church Joel Saget/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis Muslims place flowers and hold a minute of silence in front of the church if Saint-Etienne-du-Rouvray, western France, where French priest Jacques Hamel was killed on 26 July Charly Triballeau/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis Two people hold each other by the new makeshift memorial in Nice, in tribute to the victims of the deadly Bastille Day attack at the Promenade des Anglais Valery Hache/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis The Islamic State group claimed responsibility for the truck attack that killed 84 people in Nice on France's national holiday. Mohamed Lahouaiej-Bouhlel, 31, smashed a 19-tonne truck into a packed crowd of people in the Riviera city celebrating Bastille Day Valery Hache/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis Police work at a site where a Syrian migrant set off an explosive device in Ansbach, southern Germany, on 25 July, killing himself and wounding a dozen others Daniel Roland/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis A Syrian migrant set off an explosion at a bar in southern Germany that killed himself and wounded a dozen others in the third attack to hit Bavaria in a week. The 27-year-old, who had spent a stint in a psychiatric facility, had intended to target a music festival in the city of Ansbach but was turned away because he did not have a ticket Friebe/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis Police officers walk along train tracks in Wuerzburg southern Germany on 19 July, a day after a man attacked train passengers with an axe. German authorities said they had found a hand-painted IS flag among the belongings of the man, an asylum seeker from Afghanistan, who seriously injured four members of a family of tourists from Hong Kong in his rampage Daniel Roland/AFP/Getty Images Terrorism in 2016: Terror attacks in Europe claimed by Isis German police killed a teenage assailant after he attacked passengers on a train in Wuerzburg, southerg Germany with an axe and a knife on 18 July, seriously wounding three people Karl-Josef Hildenbrand/AFP/Getty Images