President leads the faithful awaiting return of 12th imam

The deep percussive thud sounded ominously like the drums of doom - an impression compounded by the preacher's doleful wailing and the copious weeping of thousands of worshippers.

However, the bass-like rhythm was produced not by drums, but by the beating of countless hands against chests in the age-old ritual of Shia Islamic worship. And the faithful inside the packed prayer hall were conveying a message not of dread, but of fervent hope.

Encouraged by the preacher's impassioned pleas, they were expressing their desire for the return of the hidden, or 12th, imam - the revered saviour of Shia Islam, whose reappearance after more than a millennium in occultation is awaited by believers in a manner similar to that with which Christian fundamentalists anticipate the second coming of Jesus. In Shia Islam, the hidden imam is predicted to reappear in Mecca and herald a new dawn of justice after the world has been torn asunder by violence and oppression.

"O thou who are close to God, be the middle man between us and God," bellowed the preacher, prompting a noisy chorus of tearful sobs from the crowd in Jamkaran, a 1,000-year-old, five-domed shrine on the outskirts of the holy city of Qom, home to Iran's religious ruling establishment. Hundreds of thousands of pilgrims from all corners of Iran go there every Tuesday night - when the imam's spirit is said to be present - to pray for their saviour's return and ask him to perform miracles.

Such devoutness is in harmony with the beliefs of Iran's ultra-Islamist president, Mahmoud Ahmadinejad, who has put the hidden imam's long-awaited return at the heart of his political philosophy in a manner not exhibited by his predecessors.

Mr Ahmadinejad's preoccupation is reported to have driven his government to allocate $17m (£9.7m) to Jamkaran's renovation. Officials at the shrine deny knowledge of such funding, but two enormous, half-completed minarets attest to the availability of large amounts of cash.

Yet even within Iran's theocratic governing system, Mr Ahmadinejad's decision to bring Shia Islam's most fundamental tenet into the political arena is deeply controversial. Some characterise his motives as a ploy designed to manipulate the religiously inclined and warn that it could be used to undermine the country's version of Islamic democracy.

"Using the 12th imam for political purposes and telling people to prepare the streets to await his return is wrong and a misuse of Islam. Nobody knows when he is going to return," said Ayatollah Hossein Ali Montazeri, once in line to become Iran's supreme leader but now under house arrest for his liberal views. "Perhaps they think they are going to draw the attraction of people through this. But the risk is that people will start identifying politics with Islam and the prophets and as soon as they spot political defects, they will blame Islam."

In what has been depicted as an example of Mr Ahmadinejad's excessive religious devotion, a video has been circulated in which he is heard telling a leading ayatollah of having felt "a light" - coming from the imam - while making a fiery speech to the UN on Iran's nuclear programme last September. Mr Ahmadinejad has dismissed the video as part of a campaign of "psychological warfare" by his enemies.

But he is unabashed about his robust beliefs on the hidden imam. "His name is known and he will emerge and establish justice in the world," Mr Ahmadinejad told a recent press conference. "I'm proud of this belief. It's not just a religious belief, it's very progressive. A belief in the 12th imam is a belief in the world of tomorrow."

His vocal support has prompted talk of grandiose projects for Jamkaran including a special rail link with Tehran, nearly 100 miles away.

Mr Ahmadinejad is tapping into a deep reservoir of religious fervour that has not run dry since the 1979 Islamic revolution. An estimated 17 million pilgrims visit Jamkaran every year. Between 500,000 and 600,000 pass through its gates each Tuesday evening during the summer. The figure falls to 300,000 in the winter months.

Many have been coming every Tuesday for the past 40 weeks or longer, believing that their requests for such earthly desires as a job or a cure for a sick child have been realised. Requests are written on a piece of paper addressed to the imam and deposited into a wishing well. "I made a vow to come every week if my husband found a job and my wish was fulfilled," said Khadidje, 26, her eyes wet with tears. "I also prayed that my uncle would be cleaned up from his drug addiction and that also came true. I believe the imam is alive and present here. He is our master."

Others express a desire for political developments that would please Mr Ahmadinejad. "What I hope is that Palestine will get its freedom back. Iran alone cannot free Palestine," said Farzad Kahzadi, 24, a police officer, who had come from Tehran with his wife to pray for the resolution of a work problem. "I agree with Ahmadinejad that Israel should be wiped off the map, but not through war. By the appearance of the 12th imam, Israel would be wiped out automatically."

Asghar Hatami, 25, a construction businessman who backed Mr Ahmadinejad in last year's presidential election, said: "I hope the 12th imam's return would bring justice, peace and fairness in the world and put an end to countries like America oppressing Islamic countries, including Iran."

Mr Ahmadinejad's critics believe his public proclamations on the 12th imam go to the heart of a debate on the nature of Iran's Islamic republic system of government provoked by recent comments from his religious mentor, Ayatollah Mohammad Taghi Mesbah-Yazdi. Questioning the necessity for elections, Mr Mesbah-Yazdi, a hardline cleric, said the system's Islamic component should override the republican element, meaning officials should derive their authority from God rather than people's votes.

"Ahmadinejad is just deceiving the masses," said Abdel Reza Tajik, political editor of the liberal Shargh newspaper. "They have been elected by people's votes but now that they want to put democracy under question, they argue that legislation and legitimacy should come from somewhere else - and that somewhere else is the 12th imam."

But the president's supporters insist he is merely stressing the purist values of the revolution. "In our political system, we are already following and practising for the return of the 12th imam by following the word of our supreme leader," said Hamid Reza Tarighi. "We are introducing a pattern for an Islamic society. The world should know what kind of pattern and society we long for. That is one of Mr Ahmadinejad's slogans."

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.