Hamid Karzai has been sworn in as Afghanistan's first directly-elected president amid tight security at the former royal palace in Kabul.
Hamid Karzai's election victory has handed him extra legitimacy
Mr Karzai, who has led the country since the Taleban were ousted in 2001, won landmark elections in October.
Among the 150 guests at the ceremony were US Vice-President Dick Cheney and US Defence Secretary Donald Rumsfeld.
Ordinary Afghans were urged to stay at home amid fears of attacks by Taleban and al-Qaeda fighters.
After the Afghan national anthem was sung by a children's choir, Mr Karzai - wearing a traditional green robe and a
black lambskin hat - placed his right
hand on a copy of the Koran and
repeated an oath of allegiance read to him by chief justice Fazl Hadi Shinwari.
"I swear to obey and safeguard the provisions of the
sacred religion of Islam, to observe the constitution and
other laws of Afghanistan and supervise their
implementation, and with the assistance of
God and the support of the nation, to make great and
sincere efforts for the happiness and progress of the
people of Afghanistan."
The audience of Afghan politicians and foreign dignitaries in the capital broke into applause after President Karzai completed his oath of allegiance.
Mr Karzai then swore in his two deputies, Ahmad Zia Massood
and Karim Khalili, members of the country's two largest
In an address following his swearing-in, Mr Karzai paid tribute to the resilience of his fellow Afghans and their willingness to work for a free, peaceful and prosperous future after decades of civil war.
"We have now left a hard and dark past behind us, and
today we are opening a new chapter in our history in a
spirit of friendship with the international community," he said.
He told his audience that the fight against the remnants of the former Taleban regime was "not yet over", and urged sustained international aid and co-operation to
defeat increasing links between extremists and
"The same co-operation has led to the rebuilding of the
Afghan state and significant progress in restoring peace,
stability and security to our country," he said.
The BBC's Pam O'Toole says one of President Karzai's immediate challenges will be forming a cabinet.
Warlords or their allies have been strongly represented in his interim administrations and, our correspondent reports, Mr Karzai will realise that if he tries to exclude them from power completely, he could face a backlash.
'Vicious terrorist network'
Hours before Mr Karzai spoke, at least 10 people died after suspected Taleban fighters attacked military posts in Khost province near the Pakistan border, reports said.
A BBC Pashto service reporter saw the bodies of four suspected militants and two Afghan soldiers. US forces took away the bodies of four more attackers, locals said.
In the capital, US and Nato troops stepped up air and ground patrols for the swearing-in.
The BBC's Andrew North in Kabul says that although the Taleban failed to make good on threats to disrupt the elections, there were widespread fears they would try again at Mr Karzai's swearing-in.
Mr Cheney and Mr Rumsfeld left Kabul later on Tuesday, after being advised not to stay in the city overnight for security reasons.
Early, Mr Cheney rallied US troops at Bagram airbase near the capital.
"For the first time the people of this country are looking confident about the future of freedom and peace," he told them.
Referring to the former regime and the al-Qaeda network it harboured, he added: "The dictatorship that harboured the most vicious terrorist network in history is now history."
The inauguration comes three years after the US-led efforts to depose the Taleban regime following the 11 September 2001 attacks in New York and Washington.
The Taleban had given sanctuary to Osama Bin Laden and members of his al-Qaeda network, who are accused of carrying out the attacks.
Mr Karzai, a Pashtun with strong support in his southern heartlands, became Afghanistan's interim leader in December 2001.
He has survived an assassination attempt as infighting continued between Afghanistan's disparate ethnic groups.
Afghanistan is still riven by tribal differences, with hugely influential warlords such as Abdul Rashid Dostum controlling large swathes of the country.
Western governments also fear that a boom in opium farming is threatening to flood Europe with cheap heroin and turn Afghanistan into a virtual "narco-state".