The "Safavid dynasty" (1502-1736) made Islam and Shi'a the state religion of Iran although Islam was already popular then. The latest kings of Iran were from the "Pahlavi dynasty", and ruled from 1925 until 1979, when there was a revolution and Ayatollah Khomeini created an Islamic republic.