KABUL, Afghanistan -- President Bush, on an unannounced visit to Afghanistan, vowed Wednesday to stand by this emerging democracy and not "cut and run" in the face of rising violence. He also predicted Osama bin Laden would be captured despite a futile five-year hunt.
"I'm confident he will be brought to justice," Bush said, standing alongside Afghan President Hamid Karzai outside the presidential palace.
Bush also rallied U.S. troops and expressed solidarity with Karzai's U.S.-backed government in a surprise visit of just over four hours at the onset of a South Asia trip.
He later flew to New Delhi, India, where tens of thousands of Indians demonstrated Wednesday against his visit, and was visiting Pakistan later in the week.
Bush pledged that bin Laden, the al-Qaida leader, and other planners of the Sept. 11, 2001, terror attacks would be caught.
"It's not a matter of if they're captured and brought to justice, it's when they're brought to justice," Bush said.
It was the first presidential visit to Afghanistan since the United States routed the Taliban and began a thus far fruitless five-year search for bin Laden in the region.
Bin Laden is believed to be hiding out somewhere along the mountainous Afghanistan-Pakistan border.
Bush held a working lunch with Karzai and other Afghan leaders, attended a ribbon-cutting ceremony at the U.S. embassy in Kabul and spoke to U.S. troops at Bagram Air Base.
"People all over the world are watching the experience here in Afghanistan," Bush said, praising Karzai as "a friend and an ally."
Karzai took power after U.S.-led forces overthrew the Taliban regime. But Taliban insurgents and al-Qaida militants have been increasing attacks within Afghanistan in recent months.
The director of the Defense Intelligence Agency, Lt. Gen. Michael D. Maples, told a congressional hearing in Washington on Tuesday that the insurgency was still growing and posed a greater threat to Karzai's government "than at any point since late 2001."
Karzai greeted Bush as "our great friend, our great supporter, a man who helped us liberate."
Turning to his three-day visit to India, Bush said the United States and Indian government still have not reached a deal over U.S. help for India's civilian nuclear program.
"This is a difficult issue," he said. Negotiations were continuing, Bush said.
"Hopefully we can reach an agreement," Bush said. "If not, we'll continue to work on it until we do."
U.S. restrictions on providing nuclear assistance to India, slapped on after back-to-back nuclear weapons tests by India and Pakistan in 1998, remain in place.
Bush and Indian Prime Minister Manmohan Singh signed an agreement in July that would provide India with nuclear fuel for the country's booming but energy-starved economy.
But the pact faces some political opposition in both countries, mostly over determining how to separate India's civilian and military nuclear facilities.
Asked about the search for bin Laden, the mastermind of the Sept. 11 terror attacks in the United States, and of the president's long-ago call for getting him "dead or alive," Bush said the search for bin Laden and his associates continues.
"We've got U.S. forces on the hunt for not only bin Laden but anybody who plots and plans with bin Laden," Bush said. "There are Afghan forces on the hunt. ... We've got Pakistan forces on the hunt."
Bush's entourage flew into the city from Bagram in a flock of heavily armed helicopters. Two door gunners on a press helicopter fired off a short burst of machine gun fire as the aircraft flew low and fast over barren, rugged countryside. A U.S. military spokesman said later the gunners were test-firing their weapons as part of "standard operating procedure" for such helicopters.
"Neither President Bush nor any of the aircraft in the flight were ever in any danger," said Lt. Col. Paul Fitzpatrick.
Before leaving Afghanistan, Bush gave a pep talk to U.S. troops at the air base. Speaking to about 500 soldiers in a huge recreational tent, Bush expressed resolve at the U.S. mission here.
"I assure you this government of yours will not blink, we will not yield. ...The United States doesn't cut and run," Bush said to enthusiastic cheers and applause.
There are about 19,000 U.S. troops in Afghanistan, a number Defense Secretary Donald H. Rumsfeld has said would be reduced to about 16,000 by summer.
At the ceremonial ribbon-cutting ceremony, Bush told U.S. embassy workers they were "on the front line of freedom's march."
Suspicion that al-Qaida and Taliban militants may be using Pakistan as base for launching terror strikes in Afghanistan has become a source of tension in relations with Afghanistan. More than two dozen suicide attacks in recent months have fueled Afghan suspicions.
Bush said that, when he is in Pakistan later this week, he will raise the issue of cross-border infiltrations with Pakistan's president, Gen. Pervez Musharraf.
Meanwhile, Pakistani security forces backed by helicopter gunships struck a militant training camp earlier Wednesday in a tribal region on Pakistan near the Afghan border, killing or wounding at least 25 militants, an official said.