Thousands of angry protesters have clashed with police after President Mahmoud Ahmadinejad was declared the winner of Iran's presidential poll.
Secret police have been attacked, while riot police used batons and tear gas against backers of Mir Hossein Mousavi, who called the results a "charade".
Correspondents say the violence is the worst seen in Tehran in a decade.
In a televised address to the nation, Mr Ahmadinejad thanked voters for giving him a "great victory".
He said the election had been "completely free".
Meanwhile, Mr Mousavi urged his supporters to avoid violence, reports the AFP news agency.
"The violations in the election are very serious and you are right to be deeply hurt," he said in a statement on his website.
"But I firmly call on you not to subject any individual or groups to hurt."
The official results gave Mr Ahmadinejad 63% of the vote against 34% for Mr Mousavi.
Iran's Supreme Leader Ayatollah Ali Khamenei praised the high turnout of 85%, described the count as a "real celebration" and called for calm.
"Enemies may want to spoil the sweetness of this event... with some kind of ill-intentioned provocations," the ayatollah said.
Mr Mousavi's supporters said the election had been stolen and vowed to seek a re-run.
But observers say this will have little chance of success.
Some of the protesters in Tehran wore Mr Mousavi's campaign colour of green and chanted "Down with the dictator", news agencies report.
Four police motorbikes were set on fire near the interior ministry, where votes had been counted, the BBC's John Simpson in Tehran says.
Interior Minister Sadeq Mahsouli warned that any demonstrations needed official permission, and none had been given.
One opposition newspaper has been closed down and BBC websites also appear to have been blocked by the Iranian authorities. The AP news agency reports that mobile phone services have been blocked in Tehran.
Mr Mousavi was hoping to prevent Mr Ahmadinejad winning more than 50% of the vote, in order to force a run-off election.
Danger of 'tyranny'
Mr Ahmadinejad said the world, especially the Western media, had waged a campaign of "psychological warfare" against the people of Iran during the election.
"It was clear what the majority of people wanted," he said.
He said the people of Iran wanted justice, development, an end to corruption and for their country's name to be respected.
But Mr Mousavi, a former prime minister, said: "I personally strongly protest the many obvious violations and I'm warning I will not surrender to this dangerous charade.
"The result of such performance by some officials will jeopardise the pillars of the Islamic Republic and will establish tyranny."
Mr Mousavi had said there was a shortage of ballot papers and alleged that millions of people had been denied the right to vote.
His election monitors were not allowed enough access to polling stations, he added.
The BBC's Jon Leyne in Tehran says the result has been greeted with surprise and with deep scepticism by many Iranians.
The figures, if they are to be believed, show Mr Ahmadinejad winning strongly even in the heartland of Mr Mousavi.
The scale of Mr Ahmadinejad's win means that many people who voted for a reformist candidate in the previous presidential election four years ago have apparently switched their votes to Mr Ahmadinejad, he adds.
However, the president does enjoy the support of many of the urban poor and rural dwellers.
"I am happy that my candidate has won - he helps the poor and he catches the thieves," sandwich seller Kamra Mohammadi, 22, told AFP.
Mr Mousavi gains much of his support from the middle classes and the educated urban population.
Surge of interest
BBC Iranian affairs analyst Sadeq Saba says the result means that hope for peaceful reform in Iran may die for a long time.
There had been a surge of interest in Iran's presidential election, with unprecedented live television debates between the candidates and rallies attended by thousands.
There were long queues at polling stations on Friday, with turnout reaching 85%.
Four candidates contested the election, with Mohsen Razai and Mehdi Karroubi only registering about 1% of the vote each.
Iran is ruled under a system known as Velayat-e Faqih, or "Rule by the Supreme Jurist", who is currently Ayatollah Ali Khamenei.
It was adopted by an overwhelming majority in 1979 following the Islamic revolution which overthrew the autocratic Western-backed Shah.
But the constitution also stipulates that the people are the source of power and the country holds phased presidential and parliamentary elections every four years.
All candidates are vetted by the powerful conservative-controlled Guardian Council, which also has the power to veto legislation it deems inconsistent with revolutionary principles.