The ayatollah said Iran's enemies had been 'given a slap in the face'
Iran's supreme leader says he has seen no proof that opposition leaders blamed for the post-election unrest were agents of foreign powers.
Ayatollah Ali Khamenei's comments contradict accusations which have frequently been made by hardliners.
A number of senior opposition figures are currently on trial in Tehran accused of conspiring with foreign powers to organise unrest.
But the ayatollah appears to be trying to reduce tensions, say correspondents.
"I do not accuse the leaders of the recent incidents to be subordinate to the foreigners, like the United States and Britain, since this issue has not been proven for me," said Ayatollah Khamenei, in a statement read out on Iranian television.
But he said there was "no doubt" the mass demonstrations, in which at least 30 people died, had been planned in advance, "whether its leaders know or not".
"This plot was defeated, since fortunately our enemies still do not understand the issue in Iran," he said.
"Our enemies were given a slap in the face by the Iranian nation, but they are still hopeful and they are pursuing the issue."
'Suspicions and rumours'
Opposition leaders say dozens of people were killed and hundreds arrested during the protests after Mahmoud Ahmadinejad was declared the winner of the presidential election.
12 June presidential election saw incumbent Mahmoud Ahmadinejad re-elected with 63% of vote
Main challenger Mir Hossein Mousavi called for result to be annulled, alleging poll fraud
Mass street protests saw at least 30 people killed and foreign media restricted
Trials are taking place of some of those allegedly involved in the unrest, but they have been dismissed by critics as show trials.
Hardliners are calling for the arrest of the two leading opposition candidates in the election - Mir Hossein Mousavi and Mehdi Karroubi - as well as former President Akbar Rafsanjani.
They accuse Mr Rafsanjani of being part of a plan by the US and Britain to destabilise Iran.
But Ayatollah Khamenei said: "One cannot move based on suspicions and rumours in issues with such high importance.
"Everyone can be sure that crimes will not be tolerated, but in such important issues the judiciary should judge based on strong reasons and evidence."
A senior cleric, Grand Ayatollah Hossein Ali Montazeri, has attacked the actions of Iran's ruling elite.
"The biggest oppression ... is despotic treatment of the people in the name of Islam," said Ayatollah Montazeri in a statement posted on his website.
"I hope the responsible authorities give up the deviant path they are pursuing and restore the trampled rights of the people."
The BBC's Kasra Naji says Ayatollah Khamenei appears to be seeking to restrain his followers.
There are indications that the trials - in which some of the accused have allegedly confessed to being part of a foreign-instigated plot - are pushing Iran into more uncertainty, our correspondent adds.