President Mahmoud Ahmadinejad: "I will be at the service of the people"
Mahmoud Ahmadinejad has been sworn in for a second term as Iran's president, after weeks of post-election unrest.
In an address after the ceremony, he criticised foreign powers who have cast doubt on the validity of the election, saying Iran would resist them.
Opposition supporters protesting outside parliament were met by hundreds of riot police.
Germany, France, Britain and the US all said they would not be sending letters of congratulation to Mr Ahmadinejad.
At least 30 people died during the street protests which followed the 12 June poll.
Mr Ahmadinejad now has two weeks to form a government that must then be approved by parliament.
'We will resist'
Taking his oath of office, broadcast live on state TV, Mr Ahmadinejad promised to "protect the official faith, the system of the Islamic revolution and the constitution".
Jon Leyne, BBC Tehran correspondent
The formalities have been observed. Iran's authorities will be pleased that the show of unity was maintained as Mr Ahmadinejad was sworn in for his second four-year term.
For the moment the fractured Iranian establishment has come together to agree on the one thing that unites them - decrying foreign interference in their domestic affairs.
Nevertheless, there was a substantial boycott by reformist members of parliament, and by leading opponents of Mr Ahmadinejad, including former President Rafsanjani.
Already the conservative press is speculating about the new cabinet. The conservative Hamshahri newspaper called for the new ministers to be "efficient, religious and prudent" - a strong hint that conservatives have not been happy with the calibre of past ministers.
The opposition has kept up its pressure on the streets. The appearance of calm and normality in Iran's affairs of state may not last very long.
In the address that followed, he called for "a national will, a national resolve", and told his audience: "We need to join forces."
"I do not have any incentive other than serving the people and the country and I do not think of anything but the progress and development of the nation," Mr Ahmadinejad said.
Following the swearing-in, he used his first address to defend the official results of the election - which gave him an overwhelming victory - and criticised Western powers' response to the disputed poll.
"Some governments should feel responsible for their words and deeds," he said.
"The people of Iran are for a constructive dialogue... We will resist violations of law and abuse...
"[Foreign governments] just want democracy at the service of their own interests - they do not respect the rights of other nations. They see themselves as the yardstick of democracy - our people oppose this, that's what our people are resisting," he said.
Several states which have criticised the elections said they would not be sending customary letters of congratulations to Mr Ahmadinejad to mark his reappointment as president, including the US, Germany, France and the UK.
Protests as Iran president take oath
"Nobody in Iran is waiting for anyone's congratulations," said Mr Ahmadinejad, to the laughter of listening deputies.
Outside, hundreds of demonstrators gathered. There were reports of clashes with riot police and at least one arrest.
There were some notable absences for Wednesday's inauguration ceremony, though envoys from the European Union and the UK did attend.
After the election I demonstrated in support of the government. This is because I see the protesters as a minority group who are trying to impose their view on the majority
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.