Saudi Arabia, Egypt, the United Arab Emirates, Yemen, Libya, Bahrain, and Maldives severed their ties with Qatar on Monday, accusing it of supporting terrorism and opening up the worst rift in years among some of the most powerful states in the Arab world.

Iran — long at odds with Saudi Arabia and a behind-the-scenes target of the move — immediately blamed President Donald Trump for setting the stage during his recent trip to Riyadh.

Gulf Arab states and Egypt have long resented Qatar's support for Islamists, especially the Egyptian-based Muslim Brotherhood, which they regard as a dangerous political enemy.

The coordinated move, with the Maldives and Libya's eastern-based government joining in later, created a dramatic rift among the Arab nations, many of which are in OPEC.

Announcing the closure of transport ties with Qatar, the three Gulf states gave Qatari visitors and residents two weeks to leave. Qatar was also expelled from the Saudi-led coalition fighting in Yemen.

Oil giant Saudi Arabia accused Qatar of backing militant groups — some backed by regional archrival Iran — and broadcasting their ideology, an apparent reference to Qatar's influential state-owned satellite channel al Jazeera.

"(Qatar) embraces multiple terrorist and sectarian groups aimed at disturbing stability in the region, including the Muslim Brotherhood, ISIS (Islamic State) and al-Qaeda, and promotes the message and schemes of these groups through their media constantly," Saudi state news agency SPA said.

It accused Qatar of supporting what it described as Iranian-backed militants in its restive and largely Shi'ite Muslim-populated eastern region of Qatif and in Bahrain.

Qatar said it was facing a campaign aimed at weakening it, denying it was interfering in the affairs of other countries.

"The campaign of incitement is based on lies that had reached the level of complete fabrications," the Qatari foreign ministry said in a statement.

Iran saw America pulling the strings.

"What is happening is the preliminary result of the sword dance," Hamid Aboutalebi, deputy chief of staff of Iran's President Hassan Rouhani, tweeted in a reference to Trump's recent visit to Saudi Arabia.