Saudi deputy defence minister Prince Khalid bin Salman on Tuesday said “the kingdom will stand by its brotherly Iraqi state”, calling their relations an “inexhaustible partnership”, the Saudi Press Agency reported.
“I was pleased with what I saw and was touched by the warm welcome during my visit to Iraq, which is dear to us and is a country rich in history with a great legacy," Prince Khalid said.
He passed on the greetings of Saudi King Salman and Crown Prince Mohammed bin Salman to Iraqi President Barham Salih, wishing him and the Iraqi people further progress, stability and prosperity.
"We discussed the brotherly ties between our two countries, and ways to improve the relationship across all avenues," Prince Khaled said on Twitter after meeting Mr Salih.
He also held talks with Iraqi Prime Minister Mustafa Al Kadhimi, Parliamentary Speaker Mohammed Al Halbousi and Defense Minister Juma Anad Al Juburi.
The officials "discussed our distinguished and brotherly relationship as well as issues of mutual interests to both our countries," Prince Khaled said.
Relations between Riyadh and Baghdad have improved in recent years, leading Saudi Arabia to reopen its embassy in Baghdad. The countries are now exchanging official visits.
Dozens of agreements were signed during the visit and Saudi Arabia agreed to contribute $3 billion to an investment fund for Iraq.
"Today, we embark on a visit to the kingdom of Saudi Arabia to strengthen our bilateral ties and enhance regional co-operation," Mr Al Kadhimi had said on Twitter at the time.
"We will work on serving our peoples' interests, achieving stability and advancing developmental values based on what binds us."
Last year, Saudi Foreign Minister Prince Faisal bin Farhan visited Iraq, as the two countries sought to strengthen ties, especially in energy.
Relations between Baghdad and Riyadh were severed after Saddam Hussein's invasion of Kuwait in 1990. Saudi Arabia also viewed with suspicion Iran-backed Iraqi governments that followed Saddam Hussein's removal in 2003.
In a bid to counter the growing Iranian influence in Iraq, the US urged the kingdom to forge ties with Baghdad.
The current visit comes a week after Mr Salih confirmed the country began hosting talks between Iran and Saudi Arabia in early April, and that discussions have continued since.
“Iraq hosted more than one round of talks between Iran and Saudi Arabia, which are ongoing and of major significance,” he told an event hosted by the Beirut Institute think tank.
The discussions aim to ease tension between Riyadh and Tehran after years of animosity that has spilt into neighbouring countries, including Iraq.
Mr Salih said the main focus of the talks was the war in Yemen, where a Saudi Arabia-led coalition is battling the Iran-backed Houthi rebels.