Iran's Supreme Leader Ayatollah Ali Khamenei declared on Wednesday that a disputed election result would stand, despite street protests that Iranian officials say Britain and the United States have incited.

(EDITORS' NOTE: Reuters and other foreign media are subject to Iranian restrictions on their ability to report, film or take pictures in Tehran.)

I had insisted and will insist on implementing the law on the election issue, Khamenei said. Neither the establishment nor the nation will yield to pressure at any cost.

Now that police and religious militia have regained apparent control of the streets after the biggest anti-government protests since the 1979 Islamic revolution, Iran's hardline leadership is blaming the discontent on foreign powers.

Britain, America and the Zionist regime (Israel) were behind the recent unrest in Tehran, Interior Minister Sadeq Mahsouli said, according to the semi-official Fars news agency.

Foreign Minister Manouchehr Mottaki said Iran was weighing whether to downgrade ties with Britain after each country expelled two diplomats this week. He also announced he had no plans to attend a G8 meeting in Italy this week on Afghanistan.

His remarks, a day after U.S. President Barack Obama said he was appalled and outraged by the clampdown in Iran, provided more evidence of rising tension with the West.

Western diplomats had seen the June 25-27 event as a rare chance for Group of Eight nations to discuss with regional powers such as Iran shared goals for Afghanistan and Pakistan.

The unexpected upheaval in Iran has thrown a spanner into Obama's plans to engage the Islamic Republic in a substantive dialogue over its nuclear program, which Tehran says is peaceful but which the West suspects is for bomb-making.

Security forces have clamped a tight grip on Tehran to prevent more rallies against the June 12 poll, which reformists say was rigged to return President Mahmoud Ahmadinejad to power and keep out moderate former Prime Minister Mirhossein Mousavi.

DEEP DIVISIONS

The furor over the election has exposed deep rifts within Iran's political elite, with Khamenei solidly backing Ahmadinejad against Mousavi, who has the support of former presidents Akbar Hashemi Rafsanjani and Mohammad Khatami.

Many of Iran's senior Shi'ite clerics in the holy city of Qom have stayed out of the political fray, although Grand Ayatollah Hossein Ali Montazeri has called for three days of national mourning from Wednesday for those killed in protests.

Montazeri was once named successor to Ayatollah Ruhollah Khomeini, but fell out with the father of the revolution before he died in 1989. He has spent years under house arrest in Qom.

At least 17 people have been killed in the protests. Amateur footage of clashes with security men, and of some of the deaths, has been posted on the Internet and viewed around the world.

Reformist cleric Mehdi Karoubi, who came last in the election, has urged Iranians to mourn the dead on Thursday.

Mousavi's wife, Zahra Rahnavard, demanded the immediate release of people detained since the election -- who include 25 employees of her husband's newspaper -- and criticized the presence of armed forces in the streets, his website reported.

It is my duty to continue legal protests to preserve Iranian rights, Rahnavard, who actively campaigned with her husband before the election, was quoted as saying.

Intelligence Minister Gholamhossein Mohseni-Ejei said some British passport-holders had been involved in riots, Fars news agency reported.

He said one of those arrested was disguised as a journalist and he was collecting information needed by the enemies.

The Iranian allegations of foreign meddling were seen in Britain as an attempt to deflect blame for the unrest.

I think it's a lot to do with trying to create national unity by creating a common external enemy which is traditionally the British, Claire Spencer, head of the Middle East and North Africa program at the Chatham House thinktank, told Reuters.

Khamenei, Iran's top authority, has accepted a request from the Guardian Council, which must ratify the vote, to allow five more days for candidates to lodge complaints, but the 12-man legislative body has already rejected demands for a re-run.

Conservative candidate Mohsen Rezaie, who came third in the poll, said he had withdrawn his complaints, citing Iran's sensitive political and security conditions, IRNA reported.

Ahmadinejad will be sworn in before parliament some time between July 26 and August 19, the Iran News newspaper said.