Iran and Saudi Arabia formally committed to reopening embassies as part of the active effort to restore diplomatic ties between the two countries in the Middle East on Thursday in Dubai, United Arab Emirates.

A few weeks prior, Iranian leaders, led by Foreign Minister Hossein Amir-Abdollahian, and Saudi Arabian leaders, led by Prince Faisal bin Farhan Al Saud, ended a seven-year conflict and reimplemented a 22-year-old pact of cooperation to work on bettering terrorism, drug smuggling and money laundering within the countries. Additionally, the leaders agreed to resume trade, investment and cultural relations, agreeing to the conditions in Beijing, China.

“The two sides emphasized the importance of following up on the implementation of the Beijing Agreement and its activation in a way that expands mutual trust and the fields of cooperation and helps create security, stability and prosperity in the region,” said the two parties in a co-statement, reported France 24.

This latest move to reopen embassies will take effect in the following months — there is a grace period of two months agreed upon by the countries to open the embassies, reported The Associated Press.

Two embassies — one in the capital of each country — will be reopened in addition to two new ones in Mashhad, Iran, and Jeddah, Saudia Arabia, per the AP.

Iran, Saudi Arabia agree to diplomatic ties after 7 years of tension