(Reuters) - The 1979 revolution toppled Shah Mohammad Reza Pahlavi, a secular monarch allied with the West, and led to the formation of an Islamic Republic headed by Ayatollah Ruhollah Khomeini, a Shi’ite cleric.

Iranian people gather during a ceremony to mark the 40th anniversary of the Islamic Revolution in Tehran, Iran February 11, 2019. Masoud Shahrestani/Tasnim News Agency/via REUTERS

These are key dates of the revolution and the rise of the Islamic Republic.

1978

Jan. 9 - Several thousand people protest in the city of Qom, a center of religious scholarship, and security forces attack, killing at least five people.

Feb. 18 - Protests are held in a number of cities to commemorate the fortieth day after the death of the Qom protesters. A number of protesters are killed in Tabriz.

Jun. 7 - The Shah replaces the head of the SAVAK secret police in an attempt to appease protesters.

Aug. 19 - Hundreds are killed in an arson fire at the Cinema Rex in Abadan in southern Iran. Protesters and officials blame each other, kicking off another round of violence.

Sept. 8 - Martial law is imposed and security forces fire on protesters in Jaleh Square in Tehran, killing at least 100 people, a day which is named “Black Friday.”

Oct. 3 - Iraqi leader Saddam Hussein deports influential senior opposition cleric Ayatollah Ruhollah Khomeini from Najaf and he settles in the Neauphle-le-Chateau suburb of Paris.

Nov. 6 - After days of protests, the Shah broadcasts the message “I heard the voice of your revolution.”

Dec. 10-11 - Timed with a religious holiday, millions of Iranians protest around the country calling for the ousting of the Shah.

Dec. 29 - Shapour Bakhtiar, a long time opposition leader, is appointed prime minister by the Shah.

1979

Jan. 4 - Bakhtiar officially becomes prime minister.

Jan. 12 - Khomeini forms a Revolutionary Council to oversee the Shah’s exit and transition to a new government.

Jan. 16 - The Shah and his wife, Empress Farah Pahlavi, leave Tehran and fly to Aswan, Egypt.

Jan. 22 - The Shah arrives in Morocco with his entourage. He spends three weeks in a palace in Marrakesh before going to the Bahamas.

Feb. 1 - Khomeini returns to Iran and is greeted by millions in Tehran.

Feb. 11 - Iran’s general staff declares the neutrality of the armed forces and troops are ordered back to their barracks, guaranteeing the Islamic Revolution’s success. Bakhtiar flees Tehran.

Feb. 14 - The U.S. embassy in Tehran is attacked and overrun but the crowds eventually leave the embassy grounds.

Feb. 16 - Iran’s revolutionary authorities start executions of leading supporters of the Shah and kill four top generals on the rooftop of a school housing Khomeini.

Mar. 5 - Iran resumes oil exports.

Mar. 30 - A referendum is held and approximately 99 percent of voters support the formation of an Islamic Republic.

Aug. 3 - Iranians elect members of the Assembly of Experts for Constitution to write a new constitution for the Islamic Republic.

Oct. 22 - The Shah arrives in the United States for medical treatment of lymphatic cancer, a disease he has secretly battled for several years.

Nov. 4 - Iranian students storm the U.S. embassy in Tehran and take 52 Americans hostage, demanding the extradition of the Shah in return for their release.

Dec. 15 - The Shah leaves the United States and travels to Panama.

1980

Jan. 25 - Abolhasan Bani-Sadr is elected the first president of the Islamic Republic.

Mar. 23 - The Shah leaves Panama and goes to Egypt where he is granted asylum by President Anwar al-Sadat. He receives urgent medical treatment.

Jul 27 - The Shah dies in Cairo from lymphoma, aged 60. Sadat gives him a state funeral and he is buried in the Al-Rifa’i Mosque in Cairo.