ANKARA (Reuters) - President Tayyip Erdogan stoked a dispute with NATO ally Germany on Tuesday, warning of Western agents “roaming free” in Turkey and telling those who threaten the country with embargoes to be ready for the consequences.

Turkish President Tayyip Erdogan addresses members of parliament from his ruling AK Party during a meeting at the parliament in Ankara, Turkey July 25, 2017. Yasin Bulbul/Presidential Palace/Handout via REUTERS

Relations between the major trading partners deteriorated after Turkey arrested 10 rights activists, including a German, three weeks ago as part of a wider security crackdown since last year’s failed military coup.

A Turkish prosecutor has accused them of links to the network of Muslim cleric Fethullah Gulen, whom Ankara blames for the attempted coup in July 2016. The U.S.-based Gulen denies any involvement.

“Westerners want their agents to roam freely in our land while they hurt our people,” Erdogan told lawmakers from his AK Party at a meeting in parliament.

“Those who say it is the judiciary’s business when it comes to the terrorists they harbor in their own country turn things into diplomatic crises when we catch their agents red-handed.”

Turkey accuses Germany of sheltering Kurdish and far-leftist militants as well as people linked to the abortive coup. Berlin denies the accusations.

Germany has increased pressure on Turkey in the past few days, threatening measures that could hinder German investment there and saying it is reviewing Turkish applications for arms projects.

Ankara has sought to limit fallout from the row, dropping a request for Germany to help it investigate hundreds of German companies it said could have links to terrorism. Erdogan said Germany companies investing in Turkey did not face difficulties.

“If you think you can scare Turkey with embargoes, you must first be ready for much bigger consequences. Are you sure you know who you are hitting?” he said.

Tensions with Germany were already running high after the arrest of a Turkish-German journalist and a pullout of German troops from a Turkish air base.

Erdogan has repeatedly lashed out at European countries including Germany in the past, accusing them of “Nazi-like” tactics when they prevented Turkish ministers from addressing rallies of expatriate Turks in Europe called to drum up support for the April 2016 referendum vote that expanded his powers.

He drew on a fresh historical reference in his broadside on Tuesday. “Those who carried out history’s most merciless, bloody, vicious massacres during the first and second world wars should not lecture us on humanity,” Erdogan said.