Five days from Iran's presidential election, these are nervy times for Ayatollah Ali Khamenei, who as only the second Supreme Leader in the Islamic Republic's 34-year history answers to God and not voters.
The Shi'ite cleric was bruised by the protests that exploded after Mahmoud Ahmadinejad's 2009 re-election and then affronted by the unruly ambitions of the man whose win he had endorsed.
Now Khamenei has said he wants a high turnout on June 14 to bolster the legitimacy of the vote, while warning the eight candidates who have survived a vetting process he controls to avoid promising any concessions to the United States.
Among the barred challengers is former President Akbar Hashemi Rafsanjani, a political heavyweight and long-time rival of Khamenei. Rafsanjani's influence has waned since Khamenei succeeded the Islamic Republic's founding father, Ayatollah Ruhollah Khomeini, as supreme leader in 1989.
Not even an ayatollah at the time, Khamenei has since lived in the shadow of his mentor, Khomeini. Struggling to impose his religious authority, he has instead built up a formidable security apparatus to extend his power.
The exclusion of high-profile candidates has dented the poll's relevance to a mainly young and restless population of 75 million. Many Iranians do not share Khamenei's ideological confrontation with the West and a nuclear policy that has incurred harsh sanctions on Iran's vital energy sectors.
Yet the 73-year-old leader has proved resilient in the four years since the violently suppressed post-election unrest that was the worst in the Islamic Republic's history.
As in 2009, Khamenei can turn to his sophisticated security structure, the hardline Islamic Revolutionary Guard Corps (IRGC) and the Basij, a paramilitary-religious force of hundreds of thousands of volunteers, to snuff out any revival of protests.
Although Khamenei and the IRGC say they favor no candidate, behind the scenes the security apparatus may be gearing up again to sway Iran's tightly constrained version of democracy and ensure the election of a loyal, obedient hardliner.
“In both 2005 and 2009, the theocratic nature of the regime prevailed amidst allegations of election engineering. Security will likely trump legitimacy in 2013,” said U.S.-based Iran expert Yasmin Alem.
“By creating a colossal bureaucracy and establishing parallel institutions Khamenei has sought to concentrate power in his office,” she said.
Khamenei's influence on major policy and economic affairs starts with the 4,000 staff, all recruited from the IRGC or secret services, at his “Beit-e Rahbar”, or leader's house.
According to leaked U.S. diplomatic cables, the Beit acts as a powerful nerve-center for an inner core of IRGC military, security and intelligence chiefs and hardline clerics in Qom.
Yet Khamenei remains an enigma, shunning interviews and foreign travel. His son Mojtaba controls access to him.
“Because Khamenei lacked Khomeini's religious credentials, he sought legitimacy in the barracks rather than the seminary,” said Karim Sadjadpour, an Iran analyst at the Carnegie Endowment for International Peace, referring to the new leader's links with the IRGC as it emerged from the 1980-88 war with Iraq.
Khamenei's official website portrays him as initially unwilling to take the job, quoting him as saying “I cried and supplicated to Allah earnestly” to spare him the responsibility.
Ironically it was Rafsanjani who backed him in the Assembly of Experts, the body that chose Khomeini's successor, because Khamenei, unlike senior clerics at the time, was committed to the former leader's doctrine of Velayet-e Faqih, or guardianship of the jurist, which underpins Iran's political structure.
Scholars abroad who have studied him paint a picture of a secretive ideologue who is deeply anti-Western, fearful of Iran's democratic institutions and paranoid about betrayal.
One of his childhood friends from Mashhad sounded a similar theme. “He is a conspiracy theorist and a true anti-American,” said Djavad Khadem, a minister under the ousted Shah.
Few Iranians had tipped Khamenei as Khomeini's heir.
He is “an accident of history” who went from being “a weak president to an initially weak supreme leader to one of the five most powerful Iranians of the last 100 years”, Sadjadpour said.
The supreme leader relies on the Vali Amr, a 10,000-strong personal security force, and wears a bullet-proof vest when appearing in public, said Mehdi Khalaji, a senior fellow at the Washington Institute who is researching a biography of Khamenei.
Such heavy protection has contributed to the isolation of a man who is enormously powerful, but who is afflicted by depression and obsessive about personal security, Khalaji said.
Lack of trust
This concern may be understandable for a leader who lost the use of his right arm in a 1981 assassination attempt. While president from 1981-89 he suffered several political betrayals.
“He doesn't trust a single person,” said Khalaji. “People are connected to him but not to each other.”
Under Iran's constitution, the leader wields supreme command of the armed forces, has the power to declare war and appoints and dismisses senior figures including armed forces commanders, judicial heads and the head of the state media network.
He effectively controls the Guardian Council - the body that oversees elections and vets candidates. His office nurtures clients throughout the bureaucracy and can rely on a conservative parliament to support its decisions.
Foreign and nuclear policy are the domain of the supreme leader, who also controls vast funds, not least via “bonyads” or charitable foundations with a web of business interests - although the poetry-loving Khamenei is not reputed for personal greed and visitors to his residence say he lives humbly.
“Khamenei crippled the democratic institutions like the presidency. That's how he developed his power,” said Khalaji. “It's a conflict between the positions of leader and president.”
Elections for president and parliament provide legitimacy for the state and cover for the leader. If problems emerge, the government can be blamed, or, as Carnegie's Sadjadpour put it:
“The Supreme Leader likes being the man above the fray. He's been very effective at wielding power without accountability.”
Khamenei sees threats by Israel and the United States to strike Iran's nuclear sites if diplomacy fails to resolve the dispute as confirming his belief that the West is bent on overthrowing the Islamic Republic's ruling system.
As the presidential election looms, little suggests he has changed his views since 2009 when he addressed Iranians at Friday prayers a week after Ahmadinejad's triumph and told them foreign hands lay behind the street protests shaking the nation.
“You see the hands of the enemy,” Khamenei declared. “The hungry wolves which lurk are slowly changing the guise of diplomacy for their real faces. See them, don't overlook them.”