Iraqi Prime Minister Adel Abdel-Mahdi met Saudi King Salman bin Abdulaziz Al Saud on Wednesday during his first official trip to Riyadh, days after his maiden visit to the Gulf kingdom's arch-nemesis Iran.

The meeting, reported by official Saudi media, comes amid steady warming of ties between Baghdad and Riyadh after decades of strain.

The two countries signed 13 major agreements, Saudi-owned Al-Arabiya television said, without giving further details.

Saudi Arabia this month announced a billion-dollar aid package for Iraq, pledging stronger relations as the kingdom competes with Iran for influence over Iraq.

The Gulf powerhouse severed relations and closed its border with its northern neighbour after late Iraqi dictator Saddam Hussein's August 1990 invasion of Kuwait.

But a flurry of visits between the two countries in recent months has indicated a thawing of ties as Riyadh seeks to counter Iran's strong presence in Iraqi politics.

Baghdad is also seeking economic benefits from closer ties with the wealthy kingdom, especially as it looks to repair the destruction left by years of fighting against the Islamic State (ISIS) group.

Iran has been highly influential in Iraq since the toppling of Saddam in 2003 by US-led forces. Experts see Iranian encroachment in Iraqi politics and economy as a reflection of Tehran's expansionist policies.

Abdel-Mahdi, named premier last October, has said Iraq now wants good relations with both Tehran and Washington.

The US reimposed tough sanctions on Tehran's energy and finance sectors last year.

But it has granted Baghdad several temporary exemptions to allow it to keep importing Iranian gas and electricity, crucial to Iraq's faltering power sector.