Following the 1979 Islamic Revolution in Iran, King Khalid sent Khomeini a congratulatory message, stating that Islamic solidarity could be the basis for closer relations of two countries. He also argued that with the foundation of the Islamic Republic in Iran there were no obstacles that inhibited the cooperation between two countries. In addition, King Khalid requested the secretary-general of the Organization of the Islamic Conference to congratulate the new Iranian government. However, his initiatives were unsuccessful in that Saudi Arabia unofficially supported Iraq against Iran in the Iran–Iraq War in 1980.