Senior Saudi and Iranian officials have been holding direct talks in a bid to repair relations between the two regional rivals, five years after they cut off diplomatic ties, according to three officials briefed on the discussions.

The negotiations, which took place in Baghdad this month, are thought to be the first significant political discussions between the two nations since 2016 and come as Joe Biden seeks to revive the nuclear deal Iran signed with world powers in 2015 and de-escalate regional tension.

Saudi Arabia is keen to end its war in Yemen against Iranian-aligned Houthi rebels, who have stepped up their attacks against Saudi cities and oil infrastructure. The Houthis have launched dozens of missiles and explosive-laden drones into the kingdom this year.

Crown Prince Mohammed bin Salman has also taken steps that appear to lean towards gaining favour with the Biden administration, which has pledged to reassess relations with the kingdom and end the six-year war in Yemen.

The first round of Saudi-Iranian talks took place in Baghdad on April 9. They included discussions about the Houthi attacks and were positive, one of the officials said.

The official said the Saudi delegation was led by Khalid bin Ali al-Humaidan, the intelligence chief, adding that another round of talks had been scheduled for next week.

The process is being facilitated by Iraqi prime minister Mustafa al-Kadhimi, who held talks with Prince Mohammed in Riyadh last month.

“It’s moving faster because the US talks [related to the nuclear deal] are moving faster and [because of] the Houthi attacks,” the official said.

A senior Saudi official denied that any talks with Iran had taken place. The Iraqi and Iranian governments did not comment.

But a senior Iraqi official and a foreign diplomat confirmed the talks. The Iraqi official added that Baghdad has also facilitated “communication channels” between Iran and Egypt, and Iran and Jordan.

“The prime minister is very keen to personally play a role in turning Iraq into a bridge between these antagonistic powers in the region,” the official said.

“It’s in Iraq’s interest that it can play this role. The more confrontation you have in the region, the more they play out here . . . and these talks have been taking place.”

Relations between Saudi Arabia, which considers itself the leader of the Sunni Muslim world, and Iran, the region’s top Shia power, hit a low in January 2016 after the kingdom’s embassy in Tehran was ransacked.

The embassy was set ablaze after Saudi Arabia executed Sheikh Nimr al-Nimr, a senior Shia cleric. The rivals, which accuse each other of destabilising the region, then severed diplomatic relations.

Tension escalated further in 2018, after former president Donald Trump unilaterally withdrew the US from the Iran nuclear deal and imposed crippling sanctions on the Islamic republic.

Prince Mohammed was a staunch backer of Trump’s maximum pressure campaign against Tehran. But Saudi Arabia’s vulnerability to attack was exposed after a missile and drone assault in September 2019 temporarily knocked out half of the kingdom’s crude oil output.

The Houthis claimed responsibility for the attack, but US and Saudi officials blamed Iran.

Washington and Riyadh accuse Iran of smuggling missiles and drones to the Houthis, a battle hardened Islamist movement that has controlled Sana’a, the Yemeni capital, and northern Yemen since early 2015.

Iraq, which is home to powerful Iranian-backed militant movements, was also caught up in the regional tension, notably when Trump ordered the assassination of Qassem Soleimani, the commander of the Quds expeditionary force of Iran’s Revolutionary Guard, in Baghdad in January 2020.

That pushed the US and the Islamic republic to the brink of war, with Iraq, which hosts about 2,500 American troops, a likely battlefield as Baghdad was squeezed between Washington and Tehran.

Iran has forged strong security, political and trade ties with its neighbour since the US-led invasion toppled Saddam Hussein in 2003.

The Saudi-Iranian talks are a sign that the election of Biden, who has said he will rejoin the 2015 nuclear deal and lift many of the sanctions on Iran if Tehran falls back into compliance with the accord, has begun to shift regional dynamics.

The nuclear agreement’s remaining signatories — Iran, the EU, Germany, France, the UK, Russia and China — have been holding talks in Vienna to pave the way for the US to rejoin.

In January, Riyadh ended a more-than-three-year regional embargo on Qatar, imposed in part because of Doha’s links to Tehran. The move was widely viewed as part of Prince Mohammed’s efforts to gain credibility with the Biden administration.

Riyadh, which opposed the atomic accord, has said it will not hinder the nuclear talks. But it wants regional powers to be involved in any discussions related to any new agreement and insists Iran’s missile programme and regional activities should be addressed.

“Kadhimi has good links into the Iranian system. The new thing is Kadhimi playing this role with Saudi Arabia,” said another official briefed on the talks. “It’s a good thing Iraq is playing this role, but it’s very early days.”

Iranian President Hassan Rouhani, whose final term ends in August, has previously indicated that he has wanted to cool hostilities with Arab rivals.

Additional reporting Najmeh Bozorgmehr