Ayatollah Ali Khamenei is Iran's spiritual leader and its highest authority - he has the final say over all government matters in the country.
The 80-year-old cleric became Supreme Leader in 1989 after the death of the Islamic Republic's founding father, Ayatollah Ruhollah Khomeini.
Since then, he has maintained a firm grip on Iran's politics and its armed forces, and suppressed challenges to the ruling system, sometimes violently.
Ayatollah Khamenei has also consistently taken hard-line stances on external matters, including the ongoing confrontation with the United States.
Born in the north-eastern city of Mashhad in 1939, the son of a religious scholar, Ali Khamenei studied at seminaries in his home city before moving to the Shia holy city of Qom.
In 1962, he joined the religious opposition movement of Ayatollah Khomeini against Shah Mohammad Reza Pahlavi.
The young Ali Khamenei became a devoted follower of Khomeini. According to his own account, everything he has done and believes today is derived from Khomeini's vision of Islam.
Ali Khamenei was actively involved in protests against the shah and was imprisoned several times.
After the Islamic Revolution in 1979, Ali Khamenei served on the Revolutionary Council, which ruled alongside the interim government. He subsequently became deputy defence minister and helped organise the Islamic Revolution Guard Corps (IRGC), which became one of Iran's most powerful institutions.
In June 1981, he was severely injured in a bomb attack on a mosque in Tehran that was blamed on a leftist insurgent group. The incident left him paralysed in his right arm.
Two months later, the same insurgent group assassinated Iran's President, Mohammad-Ali Rajai. Ali Khamenei was elected to succeed Rajai and stayed in the then largely-ceremonial role for eight years, often clashing with the then prime minister, Mir Hossein Mousavi, whom he thought favoured too much reform to the Iranian system.
After the death of Khomeini in June 1989 the Assembly of Experts (a council of clerics) chose Ali Khamenei to be the new Supreme Leader, even though he had not achieved the required rank among Shia clerics that the constitution stipulated - marja-e taqlid (source of emulation) or grand ayatollah.
To rectify the situation, the constitution was amended to say the Supreme Leader had to show "Islamic scholarship", enabling Ali Khamenei to be selected. He was also elevated overnight from the clerical rank of Hojjat al-Islam to ayatollah.
Iran's constitution was also changed to abolish the post of prime minister and vest greater authority in the presidency.
The four presidents that have served under Ayatollah Khamenei since then have each posed challenges to his authority without undermining the Islamic Republic.
Mohammad Khatami, a reformist, pushed for détente with the West and more social and political freedom in Iran while in office between 1997 and 2005. But the supreme leader and his allies blocked many of his reforms.
Mr Khatami's conservative successor, Mahmoud Ahmadinejad, was seen by some as a protégé of Ayatollah Khamenei. But he faced mounting criticism over his government's management of the economy and foreign policy decisions, and then fell out with the supreme leader after reportedly trying to increase his own powers.
Mr Ahmadinejad's disputed re-election in 2009 also triggered the biggest protests in Iran since the revolution. The supreme leader insisted the result was valid and ordered a major crackdown on dissent that saw dozens of opposition supporters killed and thousands detained.
Hassan Rouhani, a moderate who took office in 2013, negotiated a landmark nuclear deal with world powers with Ayatollah Khamenei's blessing. But the supreme leader resisted the president's efforts to expand civil liberties and overhaul the economy.
Mr Rouhani's failure to alleviate the economic hardship suffered by many ordinary Iranians, which worsened significantly after the US abandoned the nuclear deal in 2018 and reinstated sanctions on Iran, triggered mass protests in November 2019. At the protests, people were heard chanting "death to the dictator" - a reference to the supreme leader.
The unrest prompted a bloody crackdown by the security forces. Amnesty International said more than 304 people were killed, while a Reuters news agency report put the death toll at 1,500. The Iranian authorities dismissed both figures.
An official also denied a report that Ayatollah Khamenei had ordered security forces and the government to "do whatever it takes to stop them".
Ayatollah Khamenei also has final say on all aspects of Iran's foreign affairs.
He has remained suspicious of relations with the West, particularly the United States.
Back in 1981 when he was president, he set the tone for his leadership by vowing to stamp out "deviation, liberalism, and American-influenced leftists".
He did not oppose the 2015 nuclear deal, but has criticised President Rouhani for negotiating it with the expectation that the US would uphold it in the long term.
After Donald Trump's decision in 2018 to abandon the accord and re-impose sanctions, the ayatollah told the US president that he "made a mistake". He remarked: "I said from the first day: don't trust America."
When the US killed the powerful Iranian general Qasem Soleimani - a close ally and personal friend - in a drone strike in Iraq in January 2020, Ayatollah Khamenei promised "severe revenge".
He called Iran's retaliatory ballistic missile attacks on two Iraqi bases hosting US forces a "slap on the face" for America. But he stressed that "military action like this is not sufficient".
"What is important is ending the corrupting presence of America in the region," he declared.
The supreme leader has also repeatedly called for the elimination of the State of Israel.
In 2018, he described the country as a "cancerous tumour" that had to be removed from the region.
He has also publicly questioned whether the Holocaust occurred. In 2014, his Twitter feed quoted him as saying: "The Holocaust is an event whose reality is uncertain and if it has happened, it's uncertain how it has happened."
In 2020, Ayatollah Khamenei and Iran's establishment have faced two major crises.
The first began when the IRGC mistakenly shot down a Ukraine International Airlines passenger plane near Tehran on 8 January, killing all 176 people on board, many of them Iranian nationals.
A cover-up caused widespread anger, with hardline newspapers demanding resignations, and there was a fresh wave of anti-government protests. Security forces were accused of using live ammunition to disperse them.
In a rare sermon at Friday prayers, Ayatollah Khamenei said his "heart burned" for the victims of the plane downing. But he also defended the military and accused Iran's enemies of seeking to capitalise on the tragedy.
In February, Iran was struck by an outbreak of the new coronavirus disease.
Ayatollah Khamenei initially played down the threat of the coronavirus, saying it was being exaggerated by Iran's enemies as a scare tactic. "The issue is an issue that will pass. It's not something extraordinary," he said.
Given that Ayatollah Khamenei's age, together with health problems he has suffered in recent years, the question of who might succeed him as supreme leader is the subject of endless speculation.
He reportedly favours the hardline cleric Ebrahim Raisi, a defeated presidential candidate in 2017 who was appointed head of the judiciary last year. When the time comes, the Assembly of Experts will elect his replacement.