TEHRAN - President Mahmoud Ahmadinejad on Tuesday hailed his disputed re-election as a victory for the Iranian people and a defeat for the Islamic Republic's enemies.

The June 12 poll sparked Iran's most vigorous internal unrest since the 1979 Islamic revolution, but hardliners have regained the upper hand in the world's fifth biggest oil exporter, whose nuclear program has alarmed the West.

This election was actually a referendum. The Iranian nation were the victors and the enemies, despite their ... plots of a soft toppling of the system, failed and couldn't reach their aims, the state IRNA news agency quoted Ahmadinejad as saying.

Iran often accuses the West of seeking to promote a velvet revolution to overthrow its 30-year-old Islamic system.

The body that supervised the vote ruled out any further legal appeal and said those alleging fraud should be prosecuted.

Based on Iran's constitution, the Guardian Council is the top legislative body to review complaints over the election. The council members have unanimously approved the election result, its spokesman Abbasali Kadkhodai told a news conference.

The case of the 10th presidential election is closed, he said, a day after the council dismissed complaints raised by two defeated candidates, Mirhossein Mousavi and Mehdi Karoubi.

Kadkhodai urged the judiciary to take legal action against those who spread rumors about election-rigging.

A statement on Mousavi's website did not comment directly on the 12-man body's ruling, but referred to the former prime minister's letter to the Guardian Council Saturday in which he repeated his demand for the election to be annulled.

The next formal step is for Supreme Leader Ayatollah Ali Khamenei to confirm Ahmadinejad as president. Parliament will swear him in a few weeks later.

It is not clear whether Mousavi will pursue his demand for the vote to be canceled -- and risk arrest -- or accept defeat at the hands of Ahmadinejad, who is backed by Khamenei, the elite Revolutionary Guard and his own well-placed loyalists.

HARDLINE CLERIC

Hardline cleric Ahmad Khatami denounced anyone still opposing the Guardian Council's decision as opposing the law.

It shows that these people do not want to move forward within legal channels and that they would like to achieve their aims by force, Fars news agency quoted him as saying.

Khatami called in a Friday prayer sermon for leading rioters to be punished without mercy.

Hundreds of thousands of Iranians joined street protests after Ahmadinejad's victory was first declared, but riot police and religious militia have crushed protests since June 20.
State media say 20 people died in the violence, which the government and opposition blamed on each other. Many hundreds of people were detained during the unrest, but it is not clear how many are still held. Dozens of senior reformist politicians and activists hauled in shortly after the vote remain in custody.

The turbulent aftermath of the poll exposed splits in Iran's political and religious elite, but for now few options seem open for Ahmadinejad's reformist and conservative foes, who include powerful men such as former President Akbar Hashemi Rafsanjani.

Hamid Najafi, editor-in-chief of the conservative Kayhan International daily, said Mousavi, a moderate ex-premier with solid revolutionary credentials, could take no further action.

As far as the constitution is concerned ... I don't think he can do anything, Najafi told Reuters. It is over, finished.

Parliament's national security and foreign policy commission has been trying to heal rifts, holding meetings in the past week with Rafsanjani, Mousavi and Karoubi, as well as senior clerics and officials. It is also expected to meet Ahmadinejad.

We are seeking to strengthen national unity and solidarity, Hassan Ebrahimi, a member of the commission, was quoted as saying by the official IRNA news agency.

U.S. Secretary of State Hillary Clinton said Iran's rulers faced a huge credibility gap with their own people after the election and were still likely to face internal opposition.

Asked if Washington would recognize Ahmadinejad as president of Iran, she said: We're going to take this a day at a time.

Tehran, locked in a row with the West over its nuclear program, has blamed the post-vote trouble on foreign powers.

Four Iranian staff of the British embassy remain in custody, accused of stirring the unrest. Britain rejects the charge.

British Foreign Minister David Miliband said Tuesday that Britain and Iran agreed that a quick resolution of the dispute was in both countries' interests.

Najafi said he foresaw no change in Iran's attitude to the West during Ahmadinejad's second term. I don't think there is going to be any change unless the other side takes some other steps. Currently they have turned more hostile toward Iran.

(Writing by Alistair Lyon; editing by Richard Balmforth)