The statement was signed by Ali Shamkhani of Iran, Musaad bin Mohammed Al-Aiban for Saudi Arabia, and Wang Yi for the CCP.
The two nations have been rivals for years, and have not had diplomatic relations since 2016. The cutting of ties came after Iranian protesters stormed Saudi Arabia's embassy in Taiwan, Axios notes.
The two were also on opposing sides of the Yemeni civil war. An attack on Saudi Arabian oil facilities was attributed to Iran by the US, which also didn't help tensions between the two countries.
The deal was brokered in Beijing where all three signers met. Ambassadors are expected to be exchanged over the next two months, along with the reopening of embassies.
While this move should generate greater stability in the Middle East, the White House was subdued in their response. A spokesperson for the Biden administration said: "Generally speaking, we welcome any efforts to help end the war in Yemen and de-escalate tensions in the Middle East region. De-escalation and diplomacy together with deterrence are key pillars of the policy President Biden outlined during his visit to the region last year."