Hungarian Prime Minister Viktor Orban on Wednesday said his country would “use force” to protect its borders if Turkey followed through on its threat to “open the gates” of Europe to refugees.

Orban, a staunch opponent of mass migration, made the comments during an appearance on Hungary’s HirTV.

Hungarian Prime Minister Viktor Orban arrives for an EU summit in Brussels, Thursday, Oct. 17, 2019.  (Julien Warnand, Pool Photo via AP)

“The next weeks will decide what Turkey does with these people,” Orban said, referencing the 3.6 million Syrian refugees Turkey is currently hosting.

At the peak of the migration crisis in 2015, hundreds of thousands of migrants and refugees entered Europe by way of the Balkan route. Hungary, which was on the frontlines of that wave, implemented strict border controls and a fence across its border.

Turkey agreed to take in many of those refugees and ease the burden on Europe when it signed a deal with the EU in 2016 to seal off the Aegean route. But Turkey has received international condemnation for its invasion of northeast Syria following President Trump’s decision to withdraw U.S. forces there.

Last week, Turkish President Recep Tayyip Erdogan threatened to unleash refugees into Europe if the EU called Turkey’s invasion of Syria an “occupation.”

“We will open the gates and send 3.6 million refugees your way,” Erdogan reportedly said while speaking with officials from his ruling AK Party, according to Reuters.

Depending on how events unfold in the coming weeks, Orban said, Turkey will either take its refugees “back to Syria or set them off towards Europe.”

"If Turkey chooses the latter, these people will arrive at Hungary's southern border in huge masses," Orban said. "If Turkey sets off further hundreds of thousands on top of this, then we will need to use force to protect the Hungarian border and the Serbian-Hungarian frontier and I do not wish for anyone that we should need to resort to that.”

ERDOGAN THREW TRUMP’S ‘DON’T BE A FOOL’ LETTER IN THE TRASH, SOURCES CLAIM

Vice President Mike Pence and Secretary of State Mike Pompeo reached a cease-fire agreement between Turkey and Kurdish-led forces in Syria, following a meeting with Erdogan in Ankara on Thursday.

CLICK HERE TO GET THE FOX NEWS APP

The deal is for a 120-hour cease-fire, during which time the Kurdish-led forces could pull back. Turkish military operations will pause during that time, and the operation itself will come to an end upon the completion of the Kurdish withdrawal. Pence said a safe zone between the two sides will be established.

Fox News’ Ronn Blitzer and Adam Shaw contributed to this report.