Qatar restored full diplomatic relations with Iran early on Thursday and promised to send its ambassador back to Tehran – a move counter to the demands of Arab nations trying to isolate Doha as part of a regional dispute.

In announcing its decision, Qatar made no mention of the diplomatic crisis roiling Gulf Arab nations since June, when Doha found its land, sea and air routes cut off by the four Arab states.

Iran, which welcomed Doha's decision, has sent food to Qatar and allowed its airplanes to increasingly use the Islamic Republic's airspace.

Restoring diplomatic ties will undoubtedly anger those opposing Qatar in the regional dispute, chief among them Saudi Arabia, Iran's regional rival. Perhaps not unrelated, the move comes just days after Saudi Arabia began promoting a Qatari royal family member whose branch of the family was ousted in a palace coup in 1972.

"Qatar has shown it is going to go in a different direction," said Kristian Coates Ulrichsen, a research fellow at the James A. Baker III Institute for Public Policy at Rice University who lives in Seattle. "It could very well be calculated toward reinforcing the point that Qatar will not bow to this regional pressure placed upon it."

Qatar pulled its ambassador from Tehran in early 2016 after Saudi Arabia's execution of a prominent Shiite cleric sparked attacks on two Saudi diplomatic posts in Iran, a move to show solidarity with the kingdom. A short Foreign Ministry statement issued early Thursday changed that, saying Qatar's ambassador soon would return to Iran.

"The state of Qatar expressed its aspiration to strengthen bilateral relations with the Islamic Republic of Iran in all fields," the statement said.

In Iran, Foreign Ministry spokesman Bahram Ghasemi said Qatar announced its intention to return its ambassador to Tehran in a phone with Foreign Minister Mohammad Javad Zarif.

"We welcome this measure by the Qatari government," Mr. Ghasemi said, according to the state-run IRNA news agency.

Despite recalling its ambassador in 2016, Qatar maintained its valuable commercial ties to Iran. Qatar and Iran share a massive offshore natural gas field, called the South Pars Field by Tehran and the North Field by Doha.

That gas field's vast reserves made Qataris have the highest per capita income in the world, as well as funded the nation's Al-Jazeera satellite news network and secured hosting the 2022 FIFA World Cup.

Shiite power Iran also has incorporated the crisis into its regular criticism of the Sunni-ruled Saudi Arabia, part of the two Mideast powers' long-running proxy war.

However, those tensions may be easing as well, as Iran's semi-official ISNA news agency quoted Mr. Zarif as saying visas for both Iranian and Saudi diplomats to visit their respective embassies and consulates had been issued. Zarif said final steps to allow the visits likely would be taken after the annual hajj pilgrimage at the end of the month.

There was no immediate reaction from the Arab nations boycotting Qatar on its Iran decision. On Wednesday, the Central African nation of Chad announced it would close its embassy in Doha, accusing Qatar of trying to destabilize it from neighboring Libya.

The diplomatic crisis began on June 5, when Bahrain, Egypt, Saudi Arabia and the United Arab Emirates cut ties to Qatar over allegations it was funding extremists and being too close to Iran. Qatar long has denied funding extremists.

The boycotting countries later issued a list of 13 demands to Qatar, including that Doha shut its diplomatic posts in Iran. Qatar ignored the demands and let a deadline to comply pass, creating an apparent stalemate in the crisis. Attempts by Kuwait, the United States and others have failed to make headway.

In recent days, however, Saudi Arabia announced it would allow Qataris to make the annual hajj pilgrimage, which is required of all able-bodied Muslims once in their life. Saudi state media said that came in part due to an intercession by Qatari royal family member Sheikh Abdullah Al Thani, who met with Saudi Crown Prince Mohammed bin Salman, and later a vacationing King Salman in Morocco.

But Sheikh Abdullah has no role in Qatar's government and his last position was as head of the equestrian and camel racing federation decades ago. Sheikh Abdullah's grandfather, father and brother were rulers of Qatar until a palace coup ousted his branch of the royal family in 1972. There have been suggestions that the sheikh could be the start of a Qatari government-in-exile.

But Ms. Ulrichsen cautioned that so far, the Saudi moves appeared to be more needling than anything else.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"Given that a formal escalation in terms of sanctions is probably off the table for now, we're seeing this informal pressure on Qatar ... to try and perhaps stir the pot," the professor said. "I think the informal pressure is increasing because of the lack of formal alternative measures they can realistically hope to place on Qatar."

This story was reported by The Associated Press.