In 1871, Al-Afghani moved to Egypt and began preaching his ideas of political reform.
Al-Afghani was invited by Shah Nasser ad-Din to come to Iran and advise on affairs of government, but fell from favour quite quickly and had to take sanctuary in a shrine near Tehran.