A 51-year-old employee of Federal Office for the Protection of the Constitution was revealed to have been preparing a bombing attack on the office's headquarters in Cologne.
"The Office for the Protection of the Constitution has managed to expose a suspected Islamist among its associates," the agency stated, confirming previous reports of German media, including Der Spiegel magazine and Die Welt newspaper.
The man was taken into custody after he was caught sharing secret data online. The suspect is believed to have been registered under different nicknames and sharing sensitive information in online chats.
The man, a bank clerk and a family father, started to work for the agency in April 2016 and was tasked with observing the Islamic scene in Germany. According to the authorities, he behaved "inconspicuously" during the whole application process and the subsequent training.
Last year, more than one million migrants and asylum seekers arrived in Germany, raising discontent among citizens with Merkel's open-doors policy. Along with tensions in German society, there are concerns that terrorists could have come to Europe disguised as refugees.
In October 2016, German police arrested 22-year-old Syrian migrant Jaber al-Bakr, suspected of plotting a terrorist attack in Germany. The suspect committed suicide in one of the pre-trial detention facilities in Leipzig.
Later in November, three German nationals were detained by police over their alleged ties to the Ahrar ash-Sham jihadist group operating in Syria.