Sudan and Iran announced in a joint statement Monday the resumption of diplomatic relations between the two countries after a seven-year hiatus.

Khartoum cut ties with Tehran in 2016 after Iranian protesters stormed the Saudi Arabian embassy in Iran. The oil-rich kingdom had executed a prominent Shiite cleric with 46 others days earlier, triggering demonstrations and severing Saudi-Iranian relations.

At the time, Sudan was a close ally of Saudi Arabia and had deployed troops to fight in the Saudi coalition against the Iran-backed Houthi rebels in neighboring Yemen.

"Both countries agreed to take the necessary measure to open embassies in the two countries soon," Sudan's foreign ministry said in an online statement.

Iranian foreign minister, Hossein Amir-Abdollahian, and his Sudanese counterpart, Ali al-Sadiq, met in the Azerbaijani capital of Baku in July, the first known high-level meeting between the two countries since 2016.

HOW THE MIDDLE EAST CRISIS COULD EXPEDITE THE ELECTION OF A HOUSE SPEAKER

Middle East graphic

Sudan and Iran announced they will resume diplomatic relations that were severed seven years ago, and promised to open embassies soon.

CLICK HERE TO GET THE FOX NEWS APP

"The two sides agreed to enhance cooperation on different areas which can fulfill the interests of both nations and ensure security and stability in the region," Iranian state media said, in a parallel statement.

The rapprochement comes seven months after regional foes Saudi Arabia and Iran agreed to re-establish diplomatic relations and reopen embassies in a deal brokered by China.

Sudan has been rocked by violence since mid-April when fighting erupted between the country’s military, led by Gen. Abdel Fattah Burhan, and the paramilitary Rapid Support Forces, commanded by Gen. Mohamed Hamden Dagalo.

The conflict has killed at least 5,000 and wounded more than 12,000, according to according to the United Nations. Activists and medical groups in Sudan say the figures are much higher.