With his fierce anti-Western rhetoric and ever-ready quotes from the Koran, Mahmoud Ahmadinejad was widely seen as the authentic mouthpiece of Iran's theocracy when he swept to power in last summer's elections.
Yet while his hardline attitudes have horrified Iran's defeated reformists, they have also unnerved the all-powerful mullahs who backed him in the first place.
The reason is that Mr Ahmadinejad takes his spiritual cue from a man whose views go beyond even the orthodoxy of Iran's religious establishment - a little-known cleric nicknamed "Professor Crocodile" because of his harsh conservatism.
Ayatollah Mohammad Taghi Mesbah-Yazdi, who espouses total isolation from the West, has a blunt message for anyone who veers from his fundamentalist readings of Koranic texts: "If someone tells you he has a new interpretation of Islam, sock him in the mouth."
An enthusiastic supporter of both the death penalty and public floggings, and the use of suicide bombers against "enemies of Islam", the bespectacled 70-year-old is viewed as an extremist even by Ayatollah Ali Khamenei, the current religious leader who is Iran's supreme authority.
But since Ayatollah Mesbah-Yazdi issued a fatwa, or holy order, in support of Mr Ahmadinejad's presidential bid, his influence has expanded hugely, possibly eclipsing even that of Ayatollah Khameini.
From his seminary in Qom, the holy city north of Teheran, he dispenses regular wisdom to the new president as he seeks to fulfil his quest to return Iran to the spiritual values of the Islamic revolution of 1979.
Some of the choicer remarks from his fiery sermons over the years give disturbing clues to the likely mindset of his disciples, not least the man now in charge of the country.
Ayatollah Mesbah-Yazdi accuses America, for example, of trying to banish Islamic values for ever in its bid for world domination, a stance that may explain Mr Ahmadinejad's decision to reverse the detente with the United States that his reformist predecessors tried to broker.
The president's recent rejection of a European deal to end the stand-off over Iran's nuclear programme may also have been influenced by his mentor's suspicion of Western blandishments.
In a sermon at Teheran University, Ayatollah Mesbah-Yazdi reminded worshippers: "We should know that 1,400 years ago the Koran said that the enemies of Islam will always fight while chanting peace-seeking slogans."
The ayatollah's hostility towards allowing Iranians to be exposed to challenges to Islamic dogmas may also have spurred Mr Ahmadinejad's enthusiasm for censorship in the public realm, including, last month, a ban on foreign films.
In a veiled reference to the democratic principles ushered in by the previous government, Ayatollah Mesbah-Yazdi said: "An Islamic government must combat this, because injecting misleading ideas is like injecting the Aids virus!"
Young Iranians who questioned the regime after studying abroad did so only because they had been trained in "psychological warfare" by foreign universities, he added.
Ayatollah Mesbah-Yazdi's notoriety is not just confined to rhetorical flourishes, however. In addition to being an enthusiastic endorser of the fatwa against the author Salman Rushdie, he was accused of giving religious sanction to government death squads which assassinated political opponents both at home and abroad in the 1990s, a scandal that helped to produce the reform movement.
But his greatest notoriety comes from the fate of the man who gave him his nickname. Nikahang Kowsar, Iran's most famous cartoonist, was slung into prison for his depiction of "Professor Crocodile", a reptilian academic who was shown strangling a journalist with his tail.
Kowsar, who was satirising the way that Iranian clerics stifled freedom of expression, insisted the cartoon was not based on any particular individual. But his defence proved unworkable - and not just because the ayatollah's name rhymes with the Farsi word for crocodile.
Among his accusers were Ayatollah Mesbah-Yazdi's own seminary students, who knew that there was only one person to whom it could possibly refer.