TEHRAN, Iran (CNN) -- With hundreds of protesters gathering and riot police out in force on the streets of Tehran, hardline President Mahmoud Ahmadinejad took the oath of office Wednesday, beginning a second term in a bitterly divided Iran.
Mahmoud Ahmadinejad was sworn in Wednesday as Iran's president. He begins his second term.
Ahmadinejad, 52, was formally sworn in before Iran's parliament, known as the Majlis, as security forces guarded the building and nearby streets in anticipation of protests.
Witnesses reported a heavy police presence -- including members of the pro-government Basij militia -- and several choppers hovering overhead. Some reported protesters, many of them women, sitting in front of the parliament building's entrance.
As discontent surfaced yet again, Ahmadinejad vowed to take Iran forward and flung sharp words at those who questioned the validity of the June 12 elections, in which he was declared the winner with almost two-thirds of the vote.
He took particular aim at the United States, Britain, France, Italy and Germany, which have not sent formal letters of congratulations to Ahmadinejad.
"They said they would recognize the election, but will not congratulate," Ahmadinejad said in his inaugural speech. "This means they only want democracy at the service of their interests and don't respect the people's vote and rights.
"Nobody in Iran is waiting for anyone's congratulations," he said. What's next for Iran? »
Asked Tuesday whether the White House recognizes Ahmadinejad as the rightful leader of Iran, press secretary Robert Gibbs said, "He's the elected leader."
Gibbs expanded on that comment Wednesday, telling reporters "It's not for me or for us to denote his legitimacy, except to acknowledge the fact."
"Whether any election was fair, obviously the Iranian people still have questions about that, and we'll let them decide that," Gibbs said. "But I would simply say he's been inaugurated, and we know that is simply a fact."
The United States and Iran have had no diplomatic relations since 1980. Britain has maintained ties, but has criticized the Iranian crackdown on protests that followed the disputed election and has not issued a statement of congratulation to Ahmadinejad.
However, the British ambassador to Tehran did attend the ceremony, and the Foreign Office in London said the international community still needs to engage Iran on "serious issues," such as its nuclear program.
"While we need to engage with Iran's government, today's ceremony does not change our position on Iran's elections," the Foreign Office said.
Among others attending Wednesday's ceremony were Iran's top lawmakers, the heads of the three branches of government, the secretary of the Guardian Council and foreign diplomats.
But as the camera of the semi-official Press TV panned the hall, an unprecedented number of empty seats were visible. It was unclear whether opposition leaders were boycotting the inauguration.
Ahmadinejad struck a note of unity in his attempt to move Iran forward, saying "Who has voted for whom -- this is not the question. Today we need a national resolve. Today we need to join forces."
He vowed to promote religion and morality, and support righteousness and spread justice.
"I will guard the power that the people have entrusted in me as the sacred trust," Ahmadinejad said. "I will safeguard it like an honest and faithful trustee."
Ahmadinejad, however, starts another four years in office with many Iranians questioning his legitimacy.
The results of the June 12 election were widely disputed; Ahmadinejad's chief rival, reformist Mir Hossein Moussavi called the elections a "fraud."
Since the vote, Iran has seen turmoil not witnessed since the 1979 Islamic revolution as thousands have taken to the streets to protest and security forces have brutally cracked down.
Analyst Amir Taheri told CNN Wednesday that Ahmadinejad's second term will be closely watched around the world.
Taheri said the freshly inaugurated president faces myriad challenges in his second term, among them a faltering economy and a burgeoning popular movement favoring reform.
"He has to worry a lot about the opposition," Taheri said.
Iran says about 30 people have been killed in the post-election violence.
Among those who were arrested, 110 are facing trial, according to Iranian media reports.
Under Iran's constitution, the incoming president must receive the supreme leader's approval before being sworn into office. On Monday, after Ayatollah Ali Khameini gave that endorsement to Ahmadinejad, hundreds of Iranians again demonstrated in the Iranian capital.
Witnesses and sources said the crowds marched on the sidewalks around Vannak Square and Vali Asr Avenue, under the watchful eye of hundreds of Iranian security forces. Some chanted "Death to the dictator," while others said "God is great."
International media outlets, including CNN, have been restricted in their coverage of Iran in the aftermath of the elections.