Campaigning for the runoff vote that will choose Iran's next president ended Wednesday night in a flurry of bitter exchanges between groups that disagree profoundly on the direction of the theocracy.

Backers of Ali Akbar Hashemi Rafsanjani, the former two-term president, held half a dozen rallies in Tehran, the capital. At one raucous event, they warned that Rafsanjani's opponent in Friday's election, Mahmoud Ahmadinejad, would reverse social freedoms and embolden Iran's hard-line Revolutionary Guard and militias.

Gholam Hossein Karbaschi, a former mayor of Tehran, alleged that vigilantes in the holy city of Qom had roughed up an ayatollah who supported Rafsanjani.

"If they acted like that with clergy in Qom, what will they do to ordinary people?" Karbaschi said.

Across the street, Ahmadinejad supporters sat in respectful silence as they listened to speakers in a theater segregated by sex -- men on the ground floor, women in enveloping black cloaks in the balcony.

"They've got nothing to do with Islam," lawmaker Ali Khoshchehre said of Rafsanjani's supporters, who include the reformist establishment led by the outgoing president, Mohammad Khatami. "They are using power and wealth to ruin the reputation of their rival. Everybody knows it's not Islamic. It's not competition, it's a kind of jealousy. They're jealous of our candidate and his popularity."

"You should look carefully around you, and know your enemy," Khoshchehre advised.

Ahmadinejad, 49, urges a return to the religious commitment of the 1979 revolution that overthrew the U.S.-backed shah and established Iran as a republic governed by clerics who hold appointed positions that rank above the presidency.

On Wednesday, Ahmadinejad's campaign rebroadcast a deft, half-hour film on TV that showed the mayor in meetings and among crowds; he appeared as a cheerful public servant with a common touch and a modest, middle-class home. But in an unsubtle dig at the ruling political class that includes Rafsanjani, a millionaire, the film opened with a tour of the home of Tehran's previous mayor, lingering around the swimming pool, sauna and marble staircases.

"What we need is justice," Ahmadinejad says in the video. "We ask the officials now, 'Why are you residing in palaces? Why do you work in palaces?'

"They say, 'Because we are trying to keep the prestige of our country.' Where did you get this? What you are saying cannot be found in Islamic sources."

Rafsanjani, 70, billed as a "pragmatic conservative," has cast himself in the campaign as a seasoned businessman, wily negotiator and the only figure with the stature to confront hard-line clerics holding Iran back from prospering economically and renewing ties with the United States.

"We should not be frozen in the past," read a Rafsanjani banner strung across a main street in the capital Wednesday.

At least one opinion poll showed Rafsanjani with a narrow lead over Ahmadinejad, who surprised many analysts by coming in second in the first round of elections last week and qualifying for the runoff.

One of the candidates in the first round, Mehdi Karrubi, has charged that Ahmadinejad's strong finish was engineered by some Revolutionary Guard commanders and militiamen. At a news conference Tuesday, Karrubi joined other reformers in urging a large turnout on Friday. Rafsanjani campaign officials said their candidate would need a high turnout to overcome the hard-line loyalists who were all but certain to show up at the polls for Ahmadinejad.

Supporters of hard-line presidential candidate Mahmoud Ahmadinejad, Tehran's mayor, hold a campaign poster during a rally in the capital. Ahmadinejad shocked analysts by coming in second in the first round of voting last week, allowing him to advance to a runoff vote to be held Friday.