Several Arab nations have cut diplomatic ties with Qatar, citing the country’s alleged support for Islamist groups and its close relations with Iran.

In a coordinated move, Saudi Arabia, Egypt, Bahrain, and the United Arab Emirates (U.A.E.) announced on June 5 that they would withdraw their diplomatic staff and sever all contacts with Qatar, largely isolating the gas-rich nation that will host the 2022 FIFA World Cup and is home to a major U.S. military base.

Qatar said there was "no legitimate justification" for the decisions.

Persian Gulf nations see Qatar as too close to Iran and Islamist movements such as the Muslim Brotherhood, a group which some ruling families in the region view as a threat to their rule.

All the nations also said they planned to cut air and sea traffic with Qatar and gave Qatari visitors and residents two weeks to leave their countries. Saudi Arabia said it also would shut its land border with Qatar, effectively cutting off Qatar from the rest of the Arabian Peninsula.

Yemen’s internationally recognized government followed regional allies in cutting ties with Qatar. So did an eastern-based government in Libya, which has spurned the UN-backed, internationally recognized government in Tripoli and has little authority within the country.

Saudi Arabia accused Qatar of supporting "multiple terrorist and sectarian groups...including the Muslim Brotherhood, ISIS (Islamic State), and Al-Qaeda."

A statement carried by Saudi state news agency SPA also accused Qatar of supporting what it described as Iranian-backed militants in Saudi Arabia and Bahrain. Saudi Arabia also said Qatari troops would be removed from the ongoing war in Yemen.

Bahrain said its decision was the result of what it called Qatar's "media incitement, support for armed terrorist activities, and funding linked to Iranian groups to carry out sabotage and spreading chaos in Bahrain."

Egypt's Foreign Ministry said "all attempts to stop [Qatar] from supporting terrorist groups failed."

The United Arab Emirates accuses Doha of "supporting, funding and embracing terrorism, extremism, and sectarian organizations," state news agency WAM said, adding that Abu Dhabi gave Qatari diplomats 48 hours to leave.

U.A.E. carriers Emirates, Etihad, Fly Dubai. and Air Arabia, as well as Saudi Airlines, all announced earlier they would suspend flights to Doha starting from June 6.

Doha-based carrier Qatar Airways said on June 5 that it had suspended all flights to Saudi Arabia.

Qatar’s Foreign Ministry said it regretted the move, saying "the measures are unjustified and are based on claims and allegations that have no basis in fact."

Qatar-based Al-Jazeera TV quoted the ministry as saying the decisions would "not affect the normal lives of citizens and residents.”

U.S. Secretary of State Rex Tillerson called on Gulf states to stay united and work out their differences.

"We certainly would encourage the parties to sit down together and address these differences," he said on June 5.

Tillerson said he does not believe the diplomatic crisis would affect the military campaign against the extremist group Islamic State (IS) in Iraq and Syria.

Qatar is home to the sprawling Al-Udeid air base, which houses the U.S. military's Central Command and some 10,000 American troops.

In Tehran, a senior Iranian official said the decision to sever diplomatic ties with Qatar would not help end the crisis in the Middle East.

"The era of cutting diplomatic ties and closing borders...is not a way to resolve crisis. ... As I said before, aggression and occupation will have no result but instability," Hamid Aboutalebi, deputy chief of staff of Iran's President Hassan Rouhani, said on Twitter.

In Islamabad, a Foreign Ministry spokesman said that Pakistan has no immediate plans to cut ties with Qatar.

Relations have long been strained between Qatar and regional emirates and Saudi Arabia, a close ally of Bahrain and the United States.

The most recent dispute appeared to surface after what Qatar said were fake remarks published by hackers on the official Qatar News Agency on May 24.

The Qatari News Agency report claimed the small Persian Gulf nation had withdrawn its ambassadors from Bahrain, Egypt, Kuwait, Saudi Arabia, and the U.A.E. because of "tension" with the administration of U.S. President Donald Trump.

The fake article also quoted Qatar Emir Sheikh Tamim bin Hamad al-Thani as saying Iran is an "Islamic power" and Qatar's relations with Israel are "good."

But tensions appeared to increase, nevertheless.

Al-Raya, a government-owned Qatari daily, published pictures of U.A.E. journalists it called "mercenaries."

A Saudi news website showed a cartoon of a Qatari man shaking the hand of a Gulf neighbor while stabbing him in the back with a knife.

In 2014, Saudi Arabia, the U.A.E., and Bahrain withdrew their ambassadors from Qatar to protest its support for the Muslim Brotherhood, a group which some ruling families in the Gulf view as an threat to their rule.

With reporting by AP, Reuters, Al-Arabiya, and AFP