TEHRAN (Reuters) - President Barack Obama on Friday praised the bravery of Iranians who protested against a disputed election in the face of “outrageous” violence, while a hardline Iranian cleric called for the execution of leading “rioters.”

Iran’s top legislative body, which had said it found no major violations in the presidential election which set off the worst unrest since the 1979 Islamic Revolution, said 10 percent of ballot boxes would be recounted.

Authorities have rejected a call for annulment of the vote by reformist former prime minister Mirhossein Mousavi who led mass protests after he was declared a distant second behind

President Mahmoud Ahmadinejad after the poll two weeks ago.

Obama, whose administration along with major powers is locked in a row with Iran over its nuclear program, said hopes for U.S. dialogue with Iran would be affected by the post-election crackdown.

“There is no doubt that any direct dialogue or diplomacy with Iran is going to be affected by the events of the last several weeks,” Obama told a White House news conference, adding: “We don’t yet know how any potential dialogue will have been affected until we see what has happened inside of Iran.”

Iranian authorities have used a combination of warnings, arrests and the threat of police action to drive mass rallies

off Tehran’s street since Saturday with smaller gatherings dispersed with tear gas and baton charges.

Authorities have accused Mousavi of responsibility for the bloodshed, while he says the government is to blame. State media have said 20 people were killed in the violence.

ISLAMIC LAW

Ahmad Khatami, a member of the powerful Assembly of Experts, said the judiciary should charge leading “rioters” as “mohareb” or one who wages war against God.

“I want the judiciary to ... punish leading rioters firmly and without showing any mercy to teach everyone a lesson,” Khatami told worshippers at Tehran University on Friday.

“They should be punished ruthlessly and savagely,” he said. Under Iran’s Islamic law, punishment for people convicted as “mohareb” is execution.

Slideshow ( 22 images )

Obama, who said Mousavi had “captured the imagination” of people who want to open up to the West, hailed Mousavi supporters at the news conference.

“Their bravery in the face of brutality is a testament to their enduring pursuit of justice. The violence perpetrated against them is outrageous,” Obama said.

The U.S. president said he did not take seriously Ahmadinejad’s call for him to apologize for criticizing Tehran, “particularly given the fact that the United States has gone out of its way not to interfere with the election process in Iran.”

Slideshow ( 22 images )

Washington had been hoping to convince Tehran to drop what it suspects are plans to develop nuclear bombs, while also seeking its cooperation in stabilizing Afghanistan and Iraq. The government says its nuclear program is to generate power.

“Iran’s possession of nuclear weapons will trigger an arms race in the Middle East that would be bad ... for the security of the entire region,” said Obama, adding:

“So even as we clearly speak out in a unified voice in opposition to the violence that’s taken place in Iran, we also have to be steady in recognizing that the prospect of Iran with a nuclear weapon is a big problem.”

Group of Eight powers on Friday deplored violence stemming from the disputed presidential election in the world’s fifth biggest oil exporter but held open the door for Tehran to take part in talks on its nuclear program.

“We sincerely hope that Iran will seize this opportunity to give diplomacy a chance ...,” the G8 statement said.

The row over the election has exposed an unprecedented public rift within Iran’s ruling elite.

Abbasali Kadkhodai, spokesman for the Guardian Council, said that to remove all ambiguities over the vote, 10 percent of all ballot boxes would be recounted in the presence of senior officials representing government and opposition.

Political and religious figures should send election-related questions to the council and the defeated candidates had 24 hours to present their representatives for the recount, he told the students’ news agency ISNA.

The 12-man Guardian Council’s statement leaves little scope for more legal challenges to the election result, short of an attack on the position of Supreme Leader Ayatollah Ali Khamenei, who has expressed strong support for Ahmadinejad.

Former President Akbar Hashemi Rafsanjani, a Mousavi ally, chairs the Assembly of Experts which has the constitutional power to depose Khamenei. The assembly has never tried to do so and Rafsanjani is seen as unlikely to take such a radical step.

Mousavi said he was determined to keep challenging the election results despite pressure to stop.