German Chancellor Angela Merkel and the leaders of the US, France, Britain and Italy have refused to offer congratulations to Ahmadinejad on his re-election.
The new Iranian president has reacted in his inauguration speech by vowing that Iran would continue to resist "oppressive powers."
"We heard that some of the Western leaders had decided to recognize but not congratulate the new government. Well, no one in Iran is waiting for your messages."
"Iranians will neither value your scowling and bullying nor smiles and greetings," he said in his speech on Wednesday after taking the oath of office in parliament at the start of his second term as president.
Ahmadinejad now has two weeks to present a new cabinet.
Demonstrations continue in Tehran
Outside the parliamentary building in the capital Tehran, police used teargas to try to disperse hundreds of protesters. Earlier, opposition leaders Mir Hossein Mousavi and Mehdi Karubi said they would continue to contest the election results and would not collaborate with the government.
At least 20 protesters were killed and more than 1,000 were arrested in the demonstrations and unrest following the June 12 presidential elections.
Most of the people taken into custody have been released, though there are still around 250 in jail. Around 100 opposition supporters went on trial over the weekend.
The Iranian government insists the presidential election was fair and transparent and has accused Western nations of being complicit in the bloody post-election unrest.
Criticism of Sweden over attending the inauguration
Within the European Union, there had been strong criticism of Sweden's plans to send its ambassador to attend the ceremony to represent the current EU council presidency.
German politician Elmar Brok, who is also the foreign policy spokesman for the conservatives in the European Parliament, warned the EU should be more consistent in its criticism of Tehran.
"Over the past weeks, the EU has continuously demanded a recount of the vote and new elections. We also have strongly condemned the arrests and the violence against the demonstrators," he said.
"We cannot now legitimize Ahmadinejad's re-election by attending the ceremony."
Eckhard von Klaeden, the foreign policy spokesman for Merkel's CDU, said Sweden should have followed the example of most other EU countries by not sending their ambassador.
"Europe should stand united in its criticism of the rigged elections and the suppression of the opposition movement," he said.
Germany did not send its ambassador to the inauguration but only a lower-ranked diplomatic official.
Editor: Nancy Isenson