A German intelligence officer was arrested for allegedly plotting with Islamist terror groups to attack the country's domestic spy headquarters in Cologne, German media reported Tuesday.

The 51-year-old suspect, who has not been named but was reportedly a German citizen of Spanish origin, had acted "inconspicuously" before his arrest, according to Germany's intelligence agency the Federal Office for the Protection of the Constitution (BfV). It was revealed that the suspect, who joined the agency in April and had been involved in intelligence gathering on Islamist activity in Germany, had secretly reached out to individuals online offering "sensitive information about the BfV, which could lead to a threat to the office."

"The man is accused of making Islamist statements on the Internet using a false name and of revealing internal agency material in Internet chatrooms," a BfV spokesperson told Der Spiegel.

The suspect reportedly converted to Islam two years ago, apparently unbeknownst to his family. Since then it is believed he pledged his allegiance to Mohamed Mahmoud, leader of the Islamic State group, also known as ISIS, in Austria, according to the Telegraph. The suspect allegedly wrote online that he wanted to attack the "unbelievers" at the BfV "for Allah's purpose" and was caught having a conversation online with an agency informant about such an attack. He was placed under surveillance for four weeks prior to his arrest.

The suspect had supposedly "radicalized himself - undetected within his personal surroundings," according to BfV Chief Hans-Georg Maassen.

Last month,  Maassen told Reuters that he estimates there are about 40,000 Islamists in Germany, about 9,200 of them followers of the ultra-conservative Salafi movement. He warned that the nation must remain vigilant against threats from ISIS and other terrorist organizations. Germany was targeted by two ISIS-claimed attacks in July and security concerns persist throughout the country.