Turkish President Recep Tayyip Erdogan has accused Germany of harboring terrorists by allegedly not cracking down on militant anti-Turkish government groups. Erdogan slammed German Chancellor Angela Merkel in a speech Thursday in Ankara, claiming he offered her 4,000 dossiers presumably containing the files of terrorists in Germany and that she was unwilling to act on his information.

Germany has been critical in recent weeks of Turkey's mass purge of public officials and its crackdown on media following a July 15 failed coup attempt. Erdogan said Germany should worry about its own policies. 

“They are giving us advice. But it is us who is concerned about your stance. You are aiding terror! That terror will hit you like a boomerang. We have no expectations from you, but you will be remembered by history for harboring terror,” Erdogan said in his speech.

RTSNIO2 German special police forces escort a Syrian suspected of being members of Islamic State outside the building of the German Federal Supreme Court in Karlsruhe, Germany, Sept. 13, 2016. Photo: Reuters

He alleged that Germany has been a safe haven for members of the Kurdistan Workers' Party (PKK), a pro-Kurdish autonomy militant group, and the Revolutionary People's Liberation Party/Front (DHKP-C), a Marxist-Leninist guerrilla movement. Both have waged an insurgency against the Turkish state for decades and both groups are designated as terrorists by the European Union. Erdogan further stated that Germany would become a "backyard" of the FETO, referring to followers of the U.S.-based Islamic preacher Fethullah Gulen, who Erdogan blames for masterminding the coup attempt. 

“Terror is like a scorpion. Eventually, it will bite the one who is carrying it. I don’t see a bright future for Germany. It has become a place where terrorists take refuge. There are racist attacks against Turks in Germany. It is unacceptable that Germany protects terrorists,” Erdogan said.

Merkel commented Wednesday that she was "alarmed" over the state of press freedoms in Turkey, which recently extended its state of emergency declared after the coup attempt. Earlier that day, Turkey closed the iconic Cumhuriyet newspaper, founded in the earliest days of the modern Turkish republic, and 15 other media outlets.

Germany accepted about 900,000 migrants last year, however, the country is on edge since several violent attacks over the summer. Counterattacks against refugees have also occurred. German police arrested Thursday a Syrian man suspected of having links to the Islamic State group.