Saudi Arabia will reopen its embassy in Iraq for the first time in 25 years. Saudi officials will travel to the Iraqi capital of Baghdad this week to begin preparations so they can start building “at the earliest opportunity,” the Saudi Press Agency said Saturday. The move marks a major improvement in the once-rocky relations between the Arab neighbors, Reuters reported.

Saudi Arabia closed the doors of its Baghdad embassy in 1990, after Iraqi dictator Saddam Hussein invaded Kuwait.

Saudi Arabia has long accused Iraq of getting too cozy with Iran and supporting sectarian discrimination against Sunnis, according to Reuters. On a roller coaster since the 1979 Iranian Revolution, tensions between Sunni Saudi Arabia and Shiite Iran have peaked and troughed. The two countries are regional rivals competing for leadership of the Islamic world, according to the U.S.-based Council on Foreign Relations.

Saudi officials began a slow move toward rapprochement after Haider al-Abadi was appointed Iraq’s prime minister in August. The Islamic State group in Iraq has also induced cooperation between the two countries. “The Saudis think there is a gap now. If they leave Mr. Abadi without help, he will be forced to go to the Iranians,” Mustafa Alani, an Iraqi security analyst, told Reuters Saturday. “With the change of leadership, change of circumstances, they think that it’s time to bring back Iraq ... to the Arab fold and to reduce the Iranian influence.”

Saudi Arabia also plans to open a general consulate in Arbil in Iraq’s Kurdistan region. Both projects could help recover ties with Iraq “after an absence since the toppling of the Saddam Hussein regime and the penetration of the Iranian regime into the joints of the Iraqi state,” Abdullah al-Askar, head of the foreign affairs committee of Saudi Arabia’s Shoura Council, told Reuters Saturday.