Seyed Ali Khamenei was born in Mashhad, Khorasan province of Iran, in 1939. He began religious studies before completing the elementary education. He attended the classes of masters of "Sath" (seminary lectures based on reading textbooks) and "Kharej" (seminary lectures not based on reading textbooks) in Mashhad, such as Haj Sheikh Hashem Qazvini, and Ayatollah Milani, and then went to Najaf in 1957.
After a short stay he left Najaf to Mashhad, and later he settled in Qom in 1958. Khamenei attended the classes of Ayatollah Boroojerdi and Ayatollah Khomeini. Later He was involved in the Islamic activities of 1963 which led to his arrest in the city of Birjand (Southern Khorasan Province). After a short period he was released and continued his life by teaching in religious schools of Mashhad and holding Nahaj-ul-Balagheh lesson session in different Mosques.
In December 1974, Hojatoleslam Khamenei was arrested at his home by SAVAK (secret police of Shah) and dispatched to the joint committee prison of the police department in Tehran. He was released in autumn 1975, went back to Mashhad, but he was not allowed to hold his public classes.
In 1977, together with some clerics from Qom and Tehran, he established the Jame'ye Rouhaniyat Mobarez (Combatant Clerics Association) which became the basis of the Islamic Republic Party.
In January 1979, Ayatollah Khomeini appointed Hojatoleslam Khamenei as a member of the Revolutionary Council. And in March of the same year, in collaboration with his four brothers, established the Islamic Republic Party. He likewise served in the Central Council of the Party, and as deputy of the Ministry of Defense and representative of the Council in the Ministry, Commander of Islamic Revolution's Guards Corps.
Ayatollah Khamenei in Basiji (militia) outfit
Ayatollah Khomeini appointed him in 1980 to be the leader of the Friday congregational prayers in Tehran. He was also elected as a deputy of the Islamic Consultative Assembly (Majlis) in the same year.
In the summer of 1981, after delivering an important speech in the Majlis which led to the dismissal of the then President Abolhassan Bani-Sadr, an attempt was made on his life by the Mojahedin Khalq Organization (an armed opposition movement) while making a speech in a mosque in Tehran, and his chest and hand were badly injured.
Following the President Mohammad Rajaee's assassination in 1981, Hojatoleslam Khamenei was elected president of the Islamic Republic with 95% of the votes cast in his favour.
He was president for another four years. During this time, he was chairman of the Supreme Defense Council and the Supreme Cultural Revolution Council. In 1989 he received the title of "Ayatollah" from the Theological School of Qom; and on June of same year, by the death of Ayatollah Khomeini's, he was elected Vali-e Faqih (Supreme Leader of the Islamic Republic) by the majority of votes of the Assembly of Experts.
After Ayatollah Araki's death, Ayatollah Khamenei was nominated as one of the sources of imitation by the Qom's Theological School.