The assassination carried out by Khalid al-Islambouli and others from a Sunni Islamic extremist group showed the power of Iran's Shiite-led revolution across the religious divides of the Muslim world.
Islamists initially saw Iran's revolution as the start of an effort to push out the strongman Arab nationalism that had taken hold across the Middle East.
It may seem as though the Middle East has always been divided between Sunni Islam, which represents about 85 percent of the world's more than 1.8 billion Muslims, and Shiite Islam. But that divide, stemming from a disagreement centuries ago over who should succeed the Prophet Muhammad, owes much to the political rivalry between Saudi Arabia and Iran after 1979.
Long before the Islamic Revolution, Islamists had wanted to wed governments to their faith. One of the most prominent was the Muslim Brotherhood, a Sunni group founded in 1928 in Egypt that spread across the Arab world. Another was the Iranian Shiite Islamist group "Devotees of Islam," who assassinated pro-Western Prime Minister Ali Razmara in 1951.
The aftermath of World War II instead saw the rise of pan-Arab nationalists, chief among them Egypt's Gamal Abdel Nasser. Military strongmen took power, pushing for rapid modernization that shunted religion aside.
The nationalists "see themselves often as critical of religion because religion is 'backward.' It's what's been holding the Arab world back," said Daniel Byman, a senior fellow at the Brookings Institution and a professor at Georgetown University. "That's kind of the dominant divide, and Islamists of all stripes are pushing back against this."
Ayatollah Ruhollah Khomeini, who returned to Iran from exile after the departure of Shah Mohammad Reza Pahlavi, made a point to keep Shiite ideas out of speeches.
"The Iranian revolution in the beginning was portraying itself as the start of a pan-Islamic revolution," said Toby Matthiesen, a senior researcher at St. Anthony's College at the University of Oxford who is writing a book on Sunni-Shiite relations. "It was even seen like that by a lot of the Sunni Islamic movements."
Khomeini also made a point to embrace the Palestinians in their fight against Israel. Yasser Arafat, the leader of the overwhelmingly Sunni Palestinians, returned the favor by becoming the first leader to visit Khomeini.
"The Iranian revolution gave us a strong belief that the tyrants can be brought down," said Ahmed Yousef, one of the founders of Hamas, the Palestinian Islamic political party and armed wing that has controlled the Gaza Strip since 2007 with Iran's backing. "Following that big victory, the Islamic Jihad was established here in Palestine and few years later Hamas was founded too."
The pan-Islamic Iranian inspiration perhaps reached its height on Oct. 6, 1981, as Islambouli and his co-conspirators rushed out of a truck at a Cairo military parade and assassinated Sadat, who had made history by signing the first Arab peace deal with Israel. At trial, Islambouli famously clutched a Quran and shouted: "It was I who killed the Pharaoh!" Iran venerated Islambouli, naming a street in Tehran after him and issuing a postage stamp in his honor.
But by this time, Saudi Arabia, fearful of Iran's growing influence and the 1979 extremist attack on the Grand Mosque at Mecca, began pumping money into spreading its ultraconservative view of Sunni Islam throughout the world and dismissing Shiites as apostates.
"The Saudis really put a lot of money into the 'Dawah' machine to try to out-compete Iran around the world," Byman said, referring to the kingdom's proselytizing efforts. "There's a real panic and concern then."
Pan-Islamic admiration for Iran waned as it supported destabilizing attacks across the region, such as a failed 1981 militant coup in Bahrain and a 1985 car bombing targeting the emir of Kuwait. Iran's eight-year war with Iraq deepened that rift.
Iran at the same time found perhaps its greatest success in helping create the Shiite militant group Hezbollah in Lebanon, which still holds sway over much of the country decades later as both an armed group and a political party. In October 1983, a bombing at the U.S. Marine barracks in Beirut killed 231 American troops — the bloodiest day for the armed forces since World War II — and a U.S. federal judge blamed Hezbollah and Iran for the attack. Iran has long denied any involvement.
Sectarianism exploded in the region with the U.S. invasion of Iraq in 2003. Iran backed Shiite militants implicated in deadly roadside bomb attacks against U.S. forces and sectarian assaults on Sunnis. Sunni extremists repeatedly targeted Shiite civilians, and when the Islamic State group rampaged across Syria and Iraq in 2014 it massacred Shiites and other minorities. Iran intervened again, reactivating the militias to help Iraqi forces eventually defeat the extremist group.
Syria's civil war further fueled the split, as Iran and Hezbollah provided crucial military aid to President Bashar Assad, who comes from the Alawite religious minority, while Sunni Gulf countries and Turkey supported the mainly Sunni opposition.
And yet even today, the role of the Iranian revolution in stoking Sunni militancy cannot be ignored.
"The Iranian revolution played a significant role in the birth and the growth of the jihadist movements in the Arab World, as it raised the awareness of the role of religion in political change in the region," said Adnan Milhem, a Palestinian historian at al-Najah University. "The Iranian revolution affected the political thinking in the region in terms of introducing religion as a changing tool to fight oppression and corruption."
Associated Press writer Mohammed Daraghmeh in Ramallah, West Bank, contributed.