President Recep Erdogan of Turkey has ratified legislation, which were fast-tracked by its parliament, to deploy Turkish troops to Qatar. The training and assistance mission will boost the “security of the entire region,” the Qatari foreign minister said amid a diplomatic rift with its Gulf neighbors.

Erdogan signed off on the Turkish Parliament’s approval late Thursday night, after earlier criticizing the Arab nations which had moved to isolate Qatar over its alleged support of terrorism, the presidential office said in a statement.

READ MORE: Turkish MPs approve faster troop deployment to Qatar base as Erdogan slams Doha isolation

“Turkish troops are coming to Qatar for the sake of the securıty of the entire region,” Qatari Foreign Minister Mohammed bin Abdulrahman al-Thani told the press on Thursday, as cited by Hurriyet.

Up to 5,000 Turkish soldiers can be deployed to #Qatar according to legislation approved by #Turkey's parliament. — Rudaw English (@RudawEnglish) June 8, 2017

Up to 5,000 Turkish soldiers might be deployed to Qatar under the new legislation, Rudaw news reports, adding that the troops are now on standby and ready for their deployment.

READ MORE: Arab League nations v Qatar: How it all started

Turkey’s cooperation with Qatar comes as several countries and organizations – including Saudi Arabia, the United Arab Emirates (UAE), Bahrain, Egypt, Yemen, the Maldives, and one of Libya’s three rival governments – cut ties with Doha on Monday, accusing it of financing terrorist groups ranging from Islamic State (IS, formerly ISIS/ISIL) to Iran-backed militants.

Read more

Erdogan almost immediately voiced support for Doha, saying on Tuesday that “we don’t find sanctions against Qatar right,” as quoted by Bloomberg.

“The most appropriate way for the Gulf Cooperation Council countries to solve their internal issues is through dialogue. In this regard, we admire Qatar’s constructive and cool-headed approach,” Erdogan added.

On Wednesday, Turkey’s parliament swiftly approved two deals that were signed in December 2015 and April 2016 between the two nations – to provide troops to the Gulf nation and to train its domestic police force.

The Gulf crisis erupted over publications made by the official Qatari state news agency QNA May 23. It published remarks falsely attributed to Sheikh Tamim bin Hamad Al Thani, in which he allegedly discussed Iran's role in the Middle East, his views on the presidency of Donald Trump and the role of Hamas and Hezbollah in the region.

While QNA quickly retracted the news and claimed it has fallen victim to a cyberattack by an “unknown entity,” the statements revived disagreements between Qatar and a number of key Arab countries.

'#Qatar spat reveals double standards: Terrorism supporters accuse others of supporting terrorism' (Op-Edge) https://t.co/bTHZ6K3g0i — RT (@RT_com) June 6, 2017

As the crisis deepened, Kuwaiti Emir Al-Ahmad Al-Sabah flew to Qatar Wednesday night with a set of Saudi Arabian proposals aimed at deescalating tensions. Yet on Thursday, Qatar said it will not allow any outside interference in its foreign policy.

“No one has the right to intervene in our foreign policy,” Sheikh Mohammed bin Abdulrahman Al-Thani told AFP. “We are not ready to surrender, and will never be ready to surrender the independence of our foreign policy.”

The Sheikh also rejected a “military solution as an option” to end the crisis, claiming that Doha, despite any sanctions against it, could survive “forever.”