Iran's parliamentary elections will be a battle between rival ruling hardline factions that have the field to themselves after they crushed the popular reformist movement.
Iran elections: mavericks, ageing ayatollahs and the 'Kennedys of Iran'
Iran's parliamentary elections tomorrow will be a battle between rival ruling hardline factions that have the field to themselves after they crushed the popular reformist movement.
But there are bewildering divisions within the ranks of Mr Ahmadinejad's conservative rivals. They call themselves Principlists because of their avowed commitment to the principles of Iran's 1979 Islamic revolution.
Their most prominent personalities include two ageing ayatollahs, a maverick legislator, and the leading member of a highly influential family often described as the "Kennedys of Iran" after the US's most famous political dynasty.
The main pro-Khamenei faction is the United Principalist Front [UPF], a grouping of old guard forces led by Ayatollah Mohammad Reza Mahdavi-Kani. He is an octogenarian cleric and traditional conservative who heads the Assembly of Experts, a clerical body that selects and advises the supreme leader and that technically has the power to remove him.
The best-known of the UPF's candidates is Ali Larijani, the current speaker of parliament who is running in the holy city of Qom. He was an unsuccessful presidential candidate in 2005 and served as Iran's chief nuclear negotiator until he fell out with Mr Ahmadinejad.
Mr Larijani, 54, is one of five sons of a senior cleric who have been a major force in Iran's political structure for three decades, earning comparisons to the Kennedys. The parliamentary speaker's most influential brother is Sadegh Larijani Amoli, head of Iran's judiciary, and also an opponent of the president.
Another leading UPF candidate is Gholam Ali Haddad Adel, a high-profile deputy and former parliamentary speaker with a doctorate in philosophy. A senior adviser to the supreme leader, his daughter is married to one of Ayatollah Khamenei's sons.
There are many prominent, former Revolutionary Guard officers on the UPF's list of candidates, reflecting the growing influence of the elite military force in Iranian politics.
The other main conservative faction is the Islamic Constancy Front, also known as the Steadfastness Front, a radical grouping built around a vituperative anti-western cleric, Ayatollah Mohammad Taqi Mesbah-Yazdi, aged 78. Nicknamed "Professor Crocodile" by his detractors, the diminutive, white-bearded theologian was once viewed as Mr Ahmadinejad's spiritual mentor.
But he turned against his unruly protégé when the president challenged Ayatollah Khamenei over a cabinet posting last year. He also is vehemently opposed to Mr Ahmadinejad's support for his quixotic chief-of-staff, Esfandiar Rahim Mashaie, who is denigrated by the president's conservative opponents as an anti-clerical "deviant".
Ayatollah Mesbah-Yazdi argues that an Islamic government derives its authority from God, not the people, and has little time for elections.
"Who are the majority of people who vote: a bunch of hooligans who drink vodka and are paid to vote," he was quoted as saying by the daily Aftab-Yazd in 2002. Advancing his fundamentalist views, he once told Friday prayer worshippers: "If someone tells you he has a new interpretation of Islam, sock him in the mouth".
The Constancy Front has many Ahmadinejad followers among its members and is viewed as tacitly supportive of the president, refusing only to identify itself directly with him because of his refusal to ditch Mr Mashaie.
Supporters of Mr Ahmadinejad are represented by several new groups including the Islamic Government Supporters Front, the Young Advisers of the President, the Justice and Compassion Front and the Unity and Justice Front.
They claim support among the poor and rural dwellers, but are said to be badly organised. Their candidates registered mainly as independents in order to pass the strict vetting process by a panel of clerics and jurists controlled by Ayatollah Khamenei.
Senior pro-reform politicians and organisations are shunning the elections. It is the first time since the 1979 Islamic revolution that a significant political wing from within the regime has done so.
The regime will, however, boast there is still democratic plurality: 3,444 vetted candidates representing more than 230 political groups are contesting the elections. Most, however, have just several members with little hope of winning a seat.
For many Iran watchers, the most intriguing candidate is Ali Mottahari, a brother-in-law of the parliamentary speaker, Mr Larijani, and a leader of a breakaway Principlist faction, the Voice of the Nation.
Mr Mottahari is an outspoken parliamentarian and former Tehran University philosophy teacher who has spearheaded attempts to haul Mr Ahmadinejad before parliament to face questioning and possible impeachment.
His father was the late Ayatollah Morteza Mottahari, one of the intellectual leaders of the Islamic revolution.
Mr Mottahari has said he was forced out of the UPF by Mr Haddad Adel and is viewed by many conservatives as too provocative. In 2005 Mr Mottahari accused clerics of creating a schism between religion and the people and said they should stay out of government. Otherwise, he argued, they would become detached from their spiritual duties.
Although strongly conservative on social issues such as the women's dress code - he has criticised Mr Ahmadinejad for laxity on this front - Mr Mottahari has taken progressive positions politically on matters such as freedom of the press.
While loyal to Ayatollah Khamenei, he says the supreme leader should not be above criticism. And he has denounced the year-old house arrest of Mir-Hossein Mousavi and Mehdi Karrubi, the two reformist Green Movement leaders who challenged Mr Ahmadinejad for the presidency in June 2009.
"I don't think Mottahari will ever occupy a leading position because he's too maverick, young and outspoken," said Scott Lucas, an Iran expert at Birmingham University in England. "But if the anti-Ahmadinejad folks score big wins, Mottahari's importance will increase tremendously."