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.