Powerful reformists and conservatives within Iran's elite have joined forces to wage an unprecedented behind-the-scenes campaign to unseat President Mahmoud Ahmadinejad, worried that he is driving the country to the brink of collapse with populist economic policies and a confrontational stance toward the West.
The prominent figures have put their considerable efforts behind the candidacy of reformist Mir-Hossein Mousavi, who they believe has the best chance of defeating the hard-line Ahmadinejad in the presidential election Friday and charting a new course for the country.
They have used the levers of government to foil attempts by Ahmadinejad to secure funds for populist giveaways and to permit freewheeling campaigning that has benefited Mousavi. State-controlled television agreed to an unheard-of series of live debates, and the powerful Council of Guardians, which thwarted the reformist wave of the late 1990s, rejected a ballot box maneuver by the president that some saw as a prelude to attempted fraud.
Some called it a realignment of Iranian domestic politics from its longtime rift between reformists and conservatives to one that pits pragmatists on both sides against radicals such as Ahmadinejad.
"Some of the supporters of Mousavi like his ideas; others don't want Ahmadinejad," said Javad Etaat, a professor of political science and a campaigner for Mousavi. "They've decided that preserving the nation is more important than preserving the government."
Those involved in the effort say they have already outmaneuvered Ahmadinejad and his allies, including supreme leader Ayatollah Ali Khamenei, and gained the upper hand within Iranian institutions and among voters. Most analysts say that Khamenei, who has publicly stressed that he has only one vote in the election, is quietly supporting Ahmadinejad, though he is also concerned with public sentiment and trying to appear above the competition.
Several pro-Ahmadinejad lawmakers have discounted the effort against him, citing internal poll numbers they say show that the president will easily be reelected despite the powerful front arrayed against him.
In addition to protecting their own considerable financial and political interests, which include control of key segments of foreign trade, private education and agriculture, Ahmadinejad's behind-the-scenes opponents fear that a win by the incumbent will further isolate Iran internationally, weaken the middle class and give more power to the military and the Revolutionary Guard.
"We can't run Iran like North Korea," said Saeed Laylaz, a newspaper editor and analyst with contacts among the political elite. "A group of militarists cannot stuff this civilization into a can and put it away. Iran cannot make up for its lack of economic might with nuclear technology, missiles and proxy threats in Lebanon and Palestine and elsewhere."
The behind-the-scenes maneuvering is an illustration of how power works within Iran's complicated and fractured circle of power. But it also shows how much division Ahmadinejad has sown within the ruling establishment, where he is a lightning rod for anger and resentment from formidable political heavyweights among moderates and conservatives.
The effort is emerging from deep within the Iranian state, and includes some of the most prominent conservative names, including Ali Akbar Nateq-Nuri and Ali Akbar Velayati, both close to Khamenei, Iran's highest political and military authority.
But if there's a brain behind the push against Ahmadinejad, it's former President Ali Akbar Hashemi Rafsanjani, Iran's longtime kingmaker and chairman of both the powerful Expediency Council, which mediates disputes between other government bodies, and Assembly of Experts, which oversees the office of the supreme leader.
Several political insiders close to his camp said Rafsanjani brokered a deal with Khamenei several months ago in which he would encourage moderate former President Mohammad Khatami to drop out of the race in exchange for the supreme leader refraining from tilting the table in Ahmadinejad's favor during the electoral campaign.
Ahmadinejad himself publicly accused Rafsanjani of organizing the effort against him. Rafsanjani's supporters proudly acknowledge working against the president.
But many others in the Iranian establishment took action to thwart the president's bid for a second term.
Ali Larijani, the conservative parliament speaker who is from a famous clerical family, foiled Ahmadinejad's plan for handouts, which many critics see as a squandering of oil wealth and an attempt to bribe voters. Ahmadinejad has curried favor with the pious poor by handing out billions in low-interest loans to young married couples and small entrepreneurs as well as "justice" shares of state firms going public.
Critics say the giveaways increase inflation and are politically targeted handouts of resources better lavished on improving infrastructure and creating jobs.
Tehran Mayor Mohammed Baqer Qalibaf, a conservative and Iran-Iraq war hero, has loosened rules to allow late-night campaigning and hung white banners in the capital as spaces for political graffiti, benefiting Mousavi's young supporters.
Judiciary officials have promised to keep an eye on voting and warned participants against cheating at the ballot boxes and lying in campaign literature.
Even the Qom clergy, long the mainstay of Iranian hard-liners, has stayed silent, and the Council of Guardians rejected the Ahmadinejad government's request to increase the number of ballot boxes, according to the hard-line newspaper Jomhouri Eslami.
"The whole system of the government has come to the conclusion that Mousavi would be better," said Reza Kaviani, an analyst at a left-leaning Iranian think tank. "With the way Ahmadinejad is going forward, he's threatening the whole system."
The hands of Rafsanjani's multifaceted political organization can be seen in many of the moves. Ahmadinejad defeated Rafsanjani in the 2005 presidential election that many saw as flawed and has since decried him as a corrupt oligarch. Ahmadinejad poses a threat to Rafsanjani's financial empire, which includes agriculture and a lucrative network of private universities, called Azad.
Mousavi was originally a relatively unknown candidate. But he has surged rapidly, gaining strength among women and youths, and most analysts now expect that he and the other two challengers will at least force a runoff if there's no cheating.
Rafsanjani has created a multimillion-dollar electronic network under the aegis of the Expediency Council to set off alarm bells in case of suspicions of fraud, said one person close to his camp, who spoke on condition of anonymity.
He's also dispatching members of his Kargozaran political party to monitor polling stations and the election desk at the Interior Ministry. He convened a regular series of meetings to alert journalists and activists to the possibility of cheating after Ahmadinejad purged longtime employees from the section of the ministry that monitors fraud about two months ago.
"He has access to the intelligence systems of the government, and he can put pressure on the establishment," said Kaviani, who has attended the meetings. "The most important thing for him is to get rid of Ahmadinejad, no matter the cost, and he thinks that if there's no cheating Ahmadinejad won't win. All the efforts are to prevent Ahmadinejad to get 51%."
To help Mousavi further, Rafsanjani has thrown open the doors of the 300 branches of Azad University throughout the provinces to his supporters, allowing them to deliver speeches and organize inside their halls; they are often barred from using government facilities by local officials loyal to Ahmadinejad.
To counter the effect of hard-line Basiji militiamen who support Ahmadinejad, organizers have tapped into a network of students and student activists that number 3 million.
Ahmadinejad himself has repeatedly acknowledged the forces arrayed against him, casting himself as a populist hero under attack by entrenched vested interests. In a rollicking televised debate with Mousavi on Wednesday night, he accused Rafsanjani and his family of organizing to thwart his reelection by providing support to all three challengers.
"In the early days of this government, Mr. Hashemi sent a message to the king of one of the countries along the Persian Gulf and told him, 'Don't worry, within six months this government will fall,' " Ahmadinejad said. "These remarks clearly indicated the plans against this administration."
The other challengers -- former parliament speaker Mehdi Karroubi and former Revolutionary Guard commander Mohsen Rezai -- have strong ties to Rafsanjani as well as Iran's highest circles of power.
The goal has been to build a base to overcome Ahmadinejad's base among rural voters, who have benefited from his populist largesse, and his support among hard-line figures in the Revolutionary Guard and Basiji.
But the primary challenge has been to sway or pressure the supreme leader, who remains the nation's ultimate arbiter of power, to withhold his support from the president.
"It's very civilized, like a game of chess," said one figure in Rafsanjani's inner circle. "But our game is with Khamenei. Ahmadinejad is just a pawn."
Special correspondent Ramin Mostaghim contributed to this report.