Qatar has restored full diplomatic relations with Iran in defiance of four other Arab nations who have demanded it curb ties with the Islamic Republic.
The emirate recalled its ambassador in 2016 when Saudi diplomatic missions in Iran were attacked after Saudi Arabia executed a leading Shia Muslim cleric.
But Qatar now wants to strengthen bilateral relations “in all fields”.
Iran has helped Qatar cope with the trade and travel restrictions imposed by its powerful neighbours since June.
Saudi Arabia, the United Arab Emirates, Egypt and Bahrain accused Qatar of supporting terrorist groups across the region and of being too close to Iran, with which it shares the world’s largest gas field. The emirate has strenuously denied the allegations.
Qatar did not say when its ambassador would return to Tehran, but the announcement came after Foreign Minister Sheikh Mohammed bin Abdul Rahman Al Thani spoke to his Iranian counterpart Mohammad Javad Zarif by telephone.
The two men “discussed bilateral relations and means of boosting and developing them as well as a number of issues of common concern”, a statement said.
No mention was made of Qatar’s dispute with its neighbours, during which Iran has allowed Qatar Airways, the national carrier, to use its airspace and sent fresh food supplies by plane and ship to help the emirate’s 2.7 million people meet their basic needs.
There was no immediate reaction from Saudi Arabia and its allies.
Qatar’s decision to restore diplomatic relations with Iran came a week after Saudi Arabia’s King Salman and Crown Prince Mohammed bin Salman held surprise meetings with a Qatari royal whose branch of the family was ousted in a palace coup in 1972.
Riyadh credited Sheikh Abdullah bin Ali Al Thani, who has no role in Qatar’s government, with brokering a deal that would allow Qatari pilgrims to attend the Hajj pilgrimage later this month.
Saudi officials said King Salman had agreed to pay for Saudi Arabian Airlines to fly pilgrims to Mecca, and that others would be able to cross the desert border and travel by land.
But a row developed when Saudi Arabia accused Qatar of blocking its planes from landing in Doha.
Qatari officials denied the claim, saying paperwork had been sent to the wrong ministry.
On Tuesday, the foreign ministry criticised as “illogical” Saudi Arabia’s decision to only allow Saudi aircraft to fly the pilgrims, insisted that Qataris “don’t need aid in terms of covering the cost”, and warned it against exploiting the Hajj “as a tool of political manipulation”.