KABUL, Afghanistan -- Ashraf Ghani Ahmadzai was sworn in Monday as Afghanistan's new president, replacing Hamid Karzai in the country's first democratic transfer of power since the 2001 U.S.-led invasion toppled the Taliban.
Moments after Ghani Ahmadzai took the oath, he swore in his election challenger, Abdullah Abdullah, as chief executive, fulfilling a political pledge he had taken to share power and defuse election tensions that had threatened to spark violence between the country's north and south.
Ghani Ahmadzai, a former World Bank official and Afghan finance minister, wore a dark black turban popular in the country's south as he swore in his two vice presidents and then Abdullah.
Abdullah, a former foreign minister, spoke first and thanked Karzai for his service and the people of the country for casting votes in the millions despite the threat of attack from Taliban militants who tried to thwart the election process.
"We are committed as one in the national unity government," Abdullah said. "Our commitment will be fulfilled together as unified team to create national unity."
Ghani Ahmadzai then congratulated Karzai for a peaceful and democratic transition of power, and he thanked Abdullah for making the national unity government possible.
"I am not better than anyone from among you. If I do any good, give me your support. If I go wrong, set me right," Ghani Ahmadzai said.
Karzai - the only president Afghanistan and the West have known since the invasion - wore a wide smile as he greeted his presidential guards upon entering the palace. Karzai has said he is glad to be stepping down after more than a decade of what the U.S. ambassador recently said was one of the most difficult jobs in the world.
The inauguration caps a nearly six-month election season that began when ballots were first cast in April. A runoff election in June between Ghani Ahmadzai and Abdullah stretched on for weeks as both sides leveled charges of fraud. The United Nations helped carry out what it said was the most thorough recount in its history, a count that reduced Ghani Ahmadzai's vote percentage from 56 percent to 55 percent, but still gave him the win.
But the real power struggle was taking place in marathon talks between the two sides, often brokered by U.S. Secretary of State John Kerry and other U.S. officials. The political deal the sides agreed to created the new position of chief executive that Abdullah will now fill.
U.S. officials have said they expect Ghani Ahmadzai to sign a security agreement with the U.S. shortly after his inauguration to allow about 10,000 American troops to stay in the country after the international combat mission ends on Dec. 31.
Even as the inauguration unfolded in the heavily guarded presidential palace, two bomb attacks took place on the road connecting the country's main airport with the palace. A roadside bomb didn't result in any deaths or injuries, but a second attack about a half mile from the airport by a suicide bomber killed six or seven people, police officer Abdul Latif said.
A bigger attack took place in the eastern province of Paktia. Police Capt. Mohammed Hekhlas said a car bomb exploded near a government compound as gunmen attacked, sparking a gun battle that killed seven Taliban militants. Another police official, who gave his name as Azimullah, said four police officers and two civilians also were killed.
The inauguration took place eight days after the political deal was signed between Ghani Ahmadzai and Abdullah. Though Kerry played a big role in the political deal, the short notice of the inauguration date and events elsewhere in the Middle East did not enable him to attend. Instead, the U.S. was represented by John Podesta, counselor to President Obama. Other notable guests included Pakistan President Mamnoon Hussain and Indian Vice President Mohammad Hamid Ansari.