ANKARA, Turkey — Turkish President Recep Tayyip Erdogan warned the EU on Thursday that Ankara would allow millions of refugees to head to Europe if the bloc criticized Turkey’s military offensive in Syria.

“Hey EU, wake up. I say it again: if you try to frame our operation there as an invasion, our task is simple: we will open the doors and send 3.6 million migrants to you,” Erdogan said in a speech to his party.

Turkey launched an operation into Syrian territory on Wednesday, aimed at combating Kurdish militants tied to insurgents in its own territory.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

Erdogan said 109 “terrorists” had been killed so far in the operation, which would soon cover ground from Manbij in northern Syria to the Iraqi border some 350 kilometers (220 miles) east.

“God willing, we will crush these snakes’ heads quickly,” he said.

“What we are trying to do is prevent the establishment of a terrorist state on our southern border. This cannot happen,”

Turkey currently hosts 3.6 million refugees from the eight-year conflict in Syria — the highest number in the world.

Under a 2016 agreement with the EU, Turkey agreed to prevent refugees from leaving towards Europe in exchange for six billion euros and visa-free travel for its citizens, but has frequently criticized the lack of assistance from Brussels.

“You have never been sincere,” Erdogan said, addressing the EU.

“Now they say they will withhold three billion euros from us. Have you ever kept any promise you gave us so far? No.”

One aim of the military operation is to establish a “safe zone” in which at least one million Syrian refugees can be repatriated, after the long-term presence of refugees became an increasingly political liability.

“For those who want to return to their country but don’t have a home left anymore, we plan to build settlements for one million people, with international financing,” Erdogan said.

He also sought to assuage concerns regarding Islamic State prisoners currently held by Kurdish forces.

“Those that need to be kept in jail we will keep in jail. We will return foreigners to their home countries if they accept them back,” he said.