Ayatollah Ali Khamenei backs Mahmoud Ahmadinejad in address at Friday prayers

Iran's Supreme Leader, Ayatollah Ali Khamenei, has given strong backing to the hardline victor in the disputed presidential election but was forced to acknowledge 'tensions' among the elite in the Islamic Republic.

Ayatollah Ali Khamenei declared that the election in which Presidential Mahmoud Ahmadinejad was controversially declared the winner was "over".

In a clear endorsement of the incumbent presdident, the Supreme Leader said that his own views were closest to Mr Ahmadinejad's vision for Iran's foreign policy than that of any other candidate.

In a long sermon at Friday prayers at Tehran University, he also warned demonstrators that they must stop their daily protests.

The election's outcome was a vindication of the Islamic Republic, he said, and stated that there was "no cheating".

In an attempt to stave off a formal split in the regime, he declared all four candidates were part of the Islamic system. "The competition for the election was very clear and we can until now we can witness that the competition was among four persons who are from and belong to the Islamic system," he said.

He said that on the basis of an 85 per cent turnout, the vote was an earthquake for the country's enemies. "If the people did not trust in the system they would not participate in it," he said. "Iran's enemies are targeting the beliefs and trust of the people."

He declared that Iran was a functioning democracy, a message he said he wanted to send to Western countries "which are leaders of the media".

He said: "These divisions come from the Zionist radio and the bad British radio trying to change the meaning of the election."

But an attempted display of unity failed. Two candidates, Mir-Hossein Mousavi and Mehdi Karoubi, did not attend the ceremony. The former president, Hashemi Rafsanjani, who was due to have led the prayers, was also absent and Ayatollah Khamenei acknowledged some "different points of view" with the veteran powerbroker.

He condemned "black" attacks on Mr Admadinejad, who he praised as hardworking. The Supreme Leader said Mr Ahmadinejad's views on "social justice" were "closer to mine". Drawing cheers of "God is Great", he said the Basij militia, or religious police, would stand against the protesters.

The interior ministry announced that Mr Ahmadinejad won with almost 63 per cent of the vote to 34 per cent for Mr Mousavi.

Overnight Mr Ahmadinejad was forced to backtrack on his previous dismissal of the protesters as "dust" and sore losers.

"I was only addressing those who rioted, set fires and attack people. I said they are nothing," said Mr Ahmadinejad. "Every single Iranian is valuable. Government is a service to all."

The government has tried to placate Mr Mousavi and his supporters by inviting him and two other candidates who ran against the firebrand leader to a meeting on Saturday with the Guardian Council. Abbasali Khadkhodaei, a spokesman for the council, said it received 646 complaints from the three candidates. Mr Mousavi accuses the government of widespread vote-rigging and demands a full recount or a new election, flouting the will of Khamenei.

The Guardian Council also has said it was prepared to conduct a limited recount of ballots at sites where candidates claim irregularities. But Mr Mousavi accuses the government of widespread vote-rigging and demands a full recount or a new election, in defiance of Ayatollah Khamenei.

A second hardline candidate in the election criticised Mr Ahmadinejad for his "humiliating and insulting" remarks and by contrast praised President Barack Obama. Mohsen Rezai has said he detected a "different" tone from President Barack Obama on last week's disputed election, distancing himself from the regime's allegations of foreign meddling.

Mr Obama has warned that universal rights of peaceful protest should be honoured in Iran, but has refused to pick sides in the post-election showdown between Mr Ahmadinejad and his main rival Mr Mousavi.