Iraq's Prime Minister Adel Abdel Mahdi met Saudi King Salman 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 a 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 (IS) group.
Iran has been highly influential in Iraq since the toppling of Saddam in 2003, and was a key player in the territorial defeat of IS.
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 keep importing Iranian gas and electricity, crucial to Iraq's faltering power sector.