Going back in time: A look at long-fraught relations between Saudi Arabia and Iran
DUBAI: Diplomatic relations between Iran and Saudi Arabia have been tense since the 1979 Islamic Revolution, though there have been occasional thaws between the two rivals.
The tensions have now sharply escalated with Saudi Arabia severing ties with the Islamic Republic following attacks on Saudi diplomatic missions in Iran.
Here's a look at how relations between the two Mideast powers have shifted over the last decades.
Pre-revolution relations
Under the rule of Shah Mohammad Reza Pahlavi, Iran had rocky relations with Saudi Arabia, though they improved toward the end of his reign.
Both were original members of the oil cartel Organization of the Petroleum Exporting Countries (Opec).
Post revolution
After the overthrow of the shah and takeover of the United States (US) Embassy in Tehran, Saudi Arabia quickly became America's top ally in the region.
In the ensuing 1980s war between Iran and Iraq, Saudi Arabia backed Iraq despite its concerns about dictator Saddam Hussein. That war would kill 1 million people.
1987 Haj riots
The annual Haj pilgrimage saw bloodshed when Iranians held a political demonstration.
Iranian pilgrims later battled Saudi riot police, violence that killed at least 402 people.
Iran claimed 600 of its pilgrims were killed and said police fired machine guns at the crowd.
In Tehran, mobs attacked the Saudi, Kuwaiti, French and Iraqi embassies, ransacking the first two.
Severing ties
In 1988, Saudi Arabia severed ties with Iran, citing the 1987 Haj rioting and Iran's attacks on shipping in the Persian Gulf.
Iranians responded by boycotting Haj in 1988 and 1989.
The two countries restored diplomatic ties in 1991.
Easing tensions
Relations between the two nations improved after Iranian President Mohammad Khatami, a political moderate, took office in 1997.
Ties warmed further after historic visits by Saudi Crown Prince Abdullah to Tehran in December 1997 and Khatami to the kingdom in May 1999.
Nuclear dispute
Worries about Iran resumed in Saudi Arabia amid international sanctions against Tehran over its contested nuclear program and the increasingly harsh rhetoric of Iranian President Mahmoud Ahmadinejad.
Iran and Saudi Arabia each backed opposite sides in Syria's civil war, as well as in the civil war in Yemen.
Saudi Arabia also grows increasingly suspicious of Iran as it reaches a deal with world powers over its nuclear program.
Explore: View from abroad: Saudi fears over Iran nuclear deal
2015 Haj disaster
On Sept 24, a stampede and crush struck the Haj pilgrimage in Saudi Arabia.
Also read: Mina stampede deaths three times higher than acknowledged by Saudi authorities: report
While the kingdom says 769 pilgrims are killed, an Associated Press count shows over 2,400 people were killed.
Iran says at least 464 of its pilgrims were killed and blames Saudi Arabia's "incompetence" for the deaths.
Examine: Haj stampede death toll rises to 769, Iran denounces 'crime'
Sheikh's execution
On Jan 2, Saudi Arabia executed Shia cleric Sheikh Nimr al-Nimr and 46 others ─ the largest execution carried out by the kingdom in three and a half decades.
Read: Shia cleric among 47 executed in Saudi Arabia
The execution of al-Nimr, a central figure in Arab Spring-inspired protests by Saudi Arabia's Shia minority, sparked protests across the Mideast and attacks on Saudi diplomatic facilities in Iran.
Explore: Iran reacts with fury after Saudis execute Shia cleric
Saudi Arabia responded by announcing it was severing diplomatic ties with Iran over the attacks.