The dispute also exposed divisions in Iran's ruling elite, with Ayatollah Ali Khamenei, Iran supreme leader, endorsing the poll and backing Ahmadinejad, while other leading political figures supported opposition calls for a re-run.

'Hardworking and wise'

At a ceremony on Monday, Khamenei described Ahmadinejad as "courageous, hardworking and wise".

In depth

The latest on Iran's post-election unrest


Send us your videos and pictures from Iran
However, leading reformists, including former president Mohammad Khatami and Akbar Hashemi Rafsanjani, both former presidents, were absent from the ceremony.

Ayatollah Mahmoud Hashemi Shahrudi, the head of Iran's judiciary, has called for unity amid speculation that reformist MPs could boycott the swearing-in.

"I hope all officials understand the situation and maintain unity," he said on Tuesday.

"I hope they do what is best for the revolution, the regime and Islam and disappoint the enemies," ISNA news agency quoted him as saying.

But Mir Hossein Mousavi, who came in second in the presidential race, and Mehdi Karroubi, another defeated reformist candidate, have both vowed to continue their protests against Ahmadinejad's election.

"Despite all the hardship, we will continue our path to fight against the result [of the election]," Zahra Rahnavard, Mousavi's wife, was quoted as saying by Mowjcamp, a reformist website, on Tuesday.

Critical opposition

Karroubi was quoted by the Spanish El Pais newspaper as saying: "Neither Mousavi nor I have withdrawn.

"We will continue to protest and we will never collaborate with this government. We will not harm it, but we will criticise what it does.

"Quite honestly, if the authorities had acted in a different way, we would never have had these problems, because the majority of those protesting only did so for that reason."

Western nations, including the United States, Britain, France, Italy and Germany, have declined to formally congratulate Ahmadinejad on his election victory.

But on Tuesday, the White House finally announced that it considered Ahmadinejad to be Iran's elected leader.

Ahmadinejad will have two weeks to present a cabinet of ministers to the conservative-dominated assembly for approval after Wednesday's ceremony.