PM Abdul Mahdi’s trip comes after Riyadh reopened its consulate in Baghdad and announced $1bn in aid for Iraq.

Saudi Arabia’s King Salman welcomed the Iraqi prime minister on his first official visit to the kingdom, as the two oil-producing giants move towards closer diplomatic and economic ties after nearly three decades of uneasy relations.

Iraqi Prime Minister Adel Abdul Mahdi’s visit on Wednesday came two weeks after Saudi Arabia reopened its consulate in Baghdad for the first time in nearly 30 years. The opening was accompanied with the announcement of a one billion dollar aid package for Iraq.

Abdul Mahdi went to Riyadh with a large delegation, including officials and businessmen, with trade billed as a prime focus of the discussions between OPEC’s two largest oil producers.

190409135057246

His office said the leaders signed 13 agreements in areas such as trade, energy and political cooperation.

The countries have historically been at loggerheads since the Iraqi invasion of Kuwait in 1990, but Riyadh has wooed Baghdad as part of an effort to stem the growing influence of Iran.

During his visit to Tehran earlier this month, Abdul Mahdi met President Hassan Rouhani and Supreme Leader Ayatollah Ali Khamenei. Many of Iraq’s leaders, from its Shia majority, have close ties with Iran, the main Shia power in the Middle East.

Abdel Mahdi, named prime minister last October, has said Iraq now wants good relations with both Iran and the United States.

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

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