Iranian Foreign Minister Abbas Araghchi arrived in Qatar on Wednesday to meet officials and offer condolences after the death of former emir Sheikh Hamad, at a time of heightened tension between Doha and Tehran.
Mr Araghchi's visit comes days after Iran attacked what it said were US military targets in Qatar, despite the Gulf state mediating between Washington and Tehran in their war.
Iran's Islamic Revolutionary Guard Corps said on Sunday that it struck Qatar's Al Udeid Air Base, the biggest US base in the Middle East, with ballistic missiles.
Qatar said three people, including a child, were injured by falling shrapnel in the attack. It said Iran was "fully legally responsible" for it.
Doha remains one of the key regional channels of communication between Tehran and Washington. Qatar has played a prominent mediating role throughout the conflict, although officials have said mediation efforts cannot continue while the country itself is under attack.
Sheikh Hamad died on Sunday at the age of 74, and his funeral was held on the same day after the late afternoon prayer. His body was laid to rest at Lusail Cemetery, north of Doha.
Sheikh Hamad ruled Qatar from 1995 until his voluntary abdication in 2013, when he handed power to his fourth son, the current Emir, Sheikh Tamim. During his tenure, Sheikh Hamad transformed the Gulf state into a global diplomatic, economic and media power.
Arab and other leaders have been arriving in Doha to offer condolences to Sheikh Tamim, in a show of solidarity with the country and the ruling Al Thani family.
On Wednesday, the last day of state mourning, Jordan's King Abdullah arrived in Doha to pay tribute to the late Emir. Sheikh Saud bin Saqr Al Qasimi, Ruler of Ras Al Khaimah, Palestinian Authority President Mahmoud Abbas, German President Frank-Walter Steinmeier, French Prime Minister Sebastien Lecornu, Chairman of Yemen's Presidential Leadership Council Rashad Al Alimi also travelled to the Qatari capital to offer their condolences to Sheikh Tamim.
From the UAE, Sheikh Mansour bin Zayed, Vice President, Deputy Prime Minister and Chairman of the Presidential Court, and Sheikh Abdullah bin Zayed, Deputy Prime Minister and Minister of Foreign Affairs, arrived to offer their condolences to Sheikh Tamim on Tuesday.
On Monday, a number of Gulf and UAE leaders offered their condolences, including UAE Deputy Prime Minister and Minister of Interior Sheikh Saif bin Zayed, Kuwait's Crown Prince Sheikh Sabah Khalid Al Sabah and Bahrain's Crown Prince and Prime Minister Prince Salman bin Hamad Al Khalifa.
Syrian President Ahmad Al Shara, Lebanese Prime Minister Nawaf Salam, Pakistani Prime Minister Shehbaz Sharif and Rwandan President Paul Kagame also arrived in Doha. Other countries also sent officials and delegations to pay their respects.
The Iran war, which began with US and Israeli attacks on February 28, drew Iranian attacks on Gulf states that host US bases and caused major disruption to global energy supplies, pushing up oil prices and raising fears of a surge in inflation.
An interim ceasefire deal signed last month was meant to lead to further negotiations, including on Iran's nuclear programme, and aimed towards reaching a permanent settlement, but a return to talks has faltered.


