Updated

Two of the Bush administration's chief architects of the war on terror offered words of caution along with congratulations on Tuesday, a historic day for this one-time Al Qaeda (search) haven.

Vice President Dick Cheney, on his first visit to Afghanistan, and Defense Secretary Donald H. Rumsfeld, on his eighth, led a U.S. delegation to the inauguration ceremony for President Hamid Karzai (search). Before the formalities, Cheney and Rumsfeld met separately with groups of American soldiers.

"Freedom still has enemies here in Afghanistan, and you are here to make those enemies miserable," Cheney told members of the 25th Infantry Division (search) and other troops at Bagram air base north of Kabul.

In remarks to members of the 5th Special Forces Group in a separate section of the air base, Rumsfeld lauded the accomplishments in Afghanistan since U.S. forces invaded in October 2001. He told the soldiers that in the years ahead they will look back on their service with a sense of pride.

"You've been part of something enormously important," he said, noting that Afghans had their first free election and voted by the millions in October despite threats from Taliban (search) militants.

Rumsfeld cautioned, however, that the military's mission in this poor and broken country will continue.

"It's not over," he said. "There are still groups, extremists, that would like to take this country back -- the Taliban, the Al Qaeda -- and use it for a base for terrorist activities around the world as they did on 9/11. It's not going to happen."

About 17,000 U.S. troops are in Afghanistan performing combat and humanitarian missions. As of Tuesday, 115 American troops had died in and around Afghanistan since the 2001 invasion.

Some of Cheney's remarks to the troops had a self-congratulatory ring. He said many people have forgotten the forbidding challenge that loomed as the Bush administration contemplated invading a country whose small and ragtag military had managed to expel Soviet invaders a generation ago.

Afghanistan was said to have been impenetrable and unconquerable, Cheney said.

"Then the U.S. military arrived," he added. "The dictatorship that had harbored the most vicious terrorist network in history is now history."

Later, Cheney and Rumsfeld met with Karzai at the presidential palace before he took the oath of office. At a joint news conference with the new president, Cheney praised the Afghan leader.

"All Afghans can be proud that their new democracy is led by a man of honor, decency and vision," he said. "The United States stands behind President Karzai in the important work that lies ahead."

Asked by a reporter about the remaining threat from Al Qaeda inside Afghanistan, Karzai said the successful elections showed that his country, with U.S. and other international help, had defeated terrorism.

"Terrorism as a force is gone," he said. "As individuals they are all around, and we will continue to look for them," he added without mentioning Usama bin Laden, the leader of Al Qaeda who is believed to be hiding in the mountainous Afghan-Pakistan border region.

Rumsfeld flew to Kuwait after the inauguration and was to visit U.S. troops Wednesday at a base north of the Kuwaiti capital before flying to New Delhi, India.