Iraqi Prime Minister Mustafa al-Kadhemi is due to visit Saudi Arabia and Iran "in the next few hours", as part of efforts to mediate between the two countries, a cabinet source said Saturday.

Iraq has over the past year hosted five rounds of talks between the two regional rivals which have had no diplomatic ties since 2016.

After the last round of negotiations in April, Kadhemi said he believed that "reconciliation is near" between Riyadh and Tehran, a further reflection of shifting political alignments across the region.

"The official visit... comes in the context of the talks that Riyadh and Tehran recently held in Baghdad," the source within the prime minister's cabinet said in a statement.

He said those talks "represented a road map for mending relations and returning to the right course of strengthening bilateral relations" between Saudi Arabia and Iran, which support rival sides in conflict zones around the region.

The source added that the visits are "not related to internal Iraqi political affairs and the talks about the formation of the new government have nothing to do with the visit."

Months after parliamentary elections, Iraq still has not formed a new government.

Sunni Muslim Saudi Arabia and Shiite-majority Iran have had no diplomatic ties for six years, since Iranian protesters attacked Saudi diplomatic missions in Iran after the kingdom executed Shiite cleric Nimr al-Nimr.

Riyadh responded by cutting relations with Tehran.

In early March, Saudi Crown Prince Mohammed bin Salman said his country and Iran were "neighbours forever", and that it was "better for both of us to work it out and to look for ways in which we can coexist".