Officials predict a record turnout in Iran's watershed presidential elections today, with voters galvanised by an unexpectedly vibrant campaign that spawned carnival-like street rallies and the unprecedented spectacle of mudslinging between Iranian leaders live on television. The longer the queues at polling stations, the greater the chance that Mahmoud Ahmadinejad will suffer the humiliation of becoming the first president in 28 years not to win a second term in office.
The election has developed into a referendum on the hardline president's performance and rekindled hope among many Iranians disenchanted with their country's system that their vote can make a difference. Mr Ahmadinejad's main challenger, the reformist former prime minister, Mir-Hossein Mousavi, is expected to force the neck-and-neck race against the incumbent to a second round runoff vote next Friday.
Should he triumph, Mr Mousavi has pledged to put the Islamic Republic on a friendlier footing with the West and deliver more social freedom at home. The voter apathy that helped sweep Mr Ahmadinejad to his victory four years ago - together with promises to give Iran's poor a fairer share of the country's considerable oil wealth - has evaporated. About 40 million of Iran's 46.2 million eligible voters tuned in for Mr Ahmadinejad's thrilling televised verbal brawls, first against Mr Mousavi and then against another reformist challenger, the former parliamentary speaker, Mehdi Karrubi. Those viewing figures - unrivalled for the most popular reality television shows in the West, let alone presidential debates are a telling indication of the extraordinary level of public engagement in the election battle.
Just a month ago Mr Ahmadinejad appeared invulnerable. But Mr Mousavi, 68, has targeted young voters with a very slick campaign, using modern electioneering tactics from Facebook and text messages to side-by-side campaign appearances with his more charismatic wife, Zahra Rahnavard, who is a huge hit with the vital female vote. Mr Mousavi also created a fashion frenzy after adopting green, the colour of Islam, as his campaign's signature colour. Half-a-million of his supporters sporting green T-shirts and headscarves marched at his final rally on Wednesday night in Tehran, where the streets crackled with infectious, joyous energy. "Death to the dictator!" has been a common chant at Mr Mousavi's rallies although the slogan is less ferocious than it sounds. There have also been bizarre cries of "Death to potatoes!" referring to allegations that Mr Ahmadinejad has doled out free spuds to seduce voters.
The incumbent has also drawn huge crowds at his rallies. But the electrifying displays of youth-driven people power at Mr Mousavi's street parties, with the crowds calling for more freedoms, have unnerved powerful sections of Iran's old guard. The political chief of Iran's Revolutionary Guards, an elite force from which Mr Ahmadinejad draws support, issued a sinister warning on Wednesday that the authorities would crush any attempt at a popular revolution - even though Mr Mousavi is an insider of the Iranian system with impeccable revolutionary credentials.
"There are many indications that some extremist [reformist] groups have designed a colourful revolution using a specific colour for the first time in an election," Yadollah Javani declared in a statement posted on the Revolutionary Guards's website. Drawing parallels between Mr Mousavi's campaign and the "velvet revolution" that led to the ouster of the communist government in then-Czechoslovakia in 1989, he vowed that any "attempt for velvet revolution will be nipped in the bud".
The polls open today at 8am local time and will stay open until midnight, depending on the turnout. The results could come in as early as Saturday. Twenty million voters abstained during Iran's 2005 presidential elections, disillusioned with politics after Mr Ahmadinejad's charismatic reformist predecessor, Mohammad Khatami, largely failed to deliver on promises to liberalise Iran's Islamic system. Why give the system legitimacy by voting, many argued, when an unelected supreme leader holds ultimate power anyway?
But four years of Mr Ahmadinejad have changed many minds. Despite the pious rural poor who have benefited from Mr Ahmadinejad's largesse from state coffers, many Iranians believe he has hurt their standard of living, stifled political and social life and isolated Iran internationally. Mr Mousavi does not inspire in the way Mr Khatami did, but many will vote for him because they fear another four years of Mr Ahmadinejad.
Mr Khatami, who has thrown his considerable political weight behind Mr Mousavi, was stymied by an entrenched old guard who used its control of most levers of powers to block his reforms. Yet he managed to introduce incremental changes that were often lost on the country's impatient youth, which chafed for more freedom, faster. Today, the Khatami era is regarded by many as a golden age when there was far greater social and media freedom.
Mr Ahmadinejad has succeeded not only in re-invigorating the battered and often divided reformist camp. He has made influential enemies within the powerful conservative establishment who fear he has endangered the Islamic Republic with populist economic policies and recklessly hostile stance towards the West. Among them are influential figures such as Ali Akbar Nateq-Nouri, a former parliamentary speaker whom the old guard fielded in the 1997 presidential elections that were unexpectedly won by Mr Khatami. Mr Nateq-Nouri is close to the supreme leader, Ayatollah Ali Khamenei, who has given his seeming support, albeit rather grudgingly, to Mr Ahmadinejad.
Ayatollah Khamenei, however, is not immune to public opinion and makes decisions by consensus rather than decree. Should Mr Mousavi win, it will be difficult for the supreme leader to cold-shoulder US overtures or stamp out the new president's attempts to ease social restrictions. The US has studiously refrained from commenting on the elections, but the Obama factor may carry some influence today. Using respectful language, he has offered Iran an olive branch to end three decades of enmity that many Iranians view as an opportunity not be missed.
Mr Ahmadinejad's most potent rival is not even contesting the elections. Yet Ali Akbar Hashemi Rafsanjani, a two-term former president and one of Iran's most powerful and wiliest regime insiders, has been heavily involved in the campaign to unseat the incumbent, who unexpectedly beat him in the 2005 elections. Mr Ahmadinejad used his rollicking televised debate with Mr Mousavi last week to lash out at Mr Rafsanjani, accusing his family of financial corruption and of ganging up against him with his presidential challengers.
Mr Rafsanjani hit back on Wednesday, accusing the incumbent of "insults, lies and false allegations" in an explosive open letter to the supreme leader. He warned Ayatollah Khamenei of "social upheavals" if he did not rein in the turbulent president. Mr Ahmadinejad, meanwhile, has used the disparate array of forces united against him to portray himself as an underdog, adopting an injured tone that calls to mind a celebrated line from one of the low-budget British Carry On comedy films of a generation ago: "Infamy! Infamy! They've all got it in for me!" Should he lose today or next Friday, that may well be Mr Ahmadinejad's excuse.