(Adds Kadhimi, Iranian president's quotes)
By Parisa Hafezi
DUBAI, June 26 (Reuters) - Iran and Iraq have agreed to seek stability in the Middle East, Iraqi Prime Minister Mustafa al-Kadhimi said in Tehran on Sunday, a day after he visited Saudi Arabia in a bid to revive talks between the regional rivals to ease years of hostility.
Iran and Saudi Arabia, the leading Shi'ite and Sunni Muslim powers in the Middle East, severed ties in 2016, with both parties backing allies fighting proxy wars across the region, from Yemen to Syria and elsewhere.
"We have agreed to work together to bring stability and calm to the region," Kadhimi said in a joint televised news conference with Iran's President Ebrahim Raisi.
An Iranian official told Reuters earlier on Sunday that "the resumption of talks between Tehran and Riyadh will be discussed during Kadhimi's trip to Iran".
"Dialogue with regional officials can resolve the regional issues," Raisi said, without elaborating.
The fifth round of talks between the regional rivals were held in April, after Iran suspended the negotiations in March without giving a reason but the decision was made following Saudi Arabia's execution of 81 men in its biggest mass execution in decades. Tehran condemned the executions that activists said included 41 Shi'ite Muslims.
On Saturday, Kadhimi held talks with Saudi de facto ruler Crown Prince Mohammed bin Salman in Jeddah that the state news agency SPA said included bilateral relations and "boosting security and stability in the region".
Kadhimi’s visit comes as a months-long impasse in the indirect talks between Tehran and Washington is expected to break in the coming days to secure a 2015 nuclear pact which curbed Tehran's nuclear programme in exchange for sanctions relief.
U.S. President Joe Biden is expected to visit Riyadh in mid-July and talks are expected to include Gulf security concerns over Iran's ballistic missiles programme and network of proxies across the Middle East. (Writing by Parisa Hafezi; Editing by Raissa Kasolowsky and Emelia Sithole-Matarise)