By JENNIFER LOVEN
AP White House Correspondent
KABUL - Under elaborate secrecy, President Barack Obama slipped into Afghanistan on Sunday near the front lines of the increasingly bloody 8-year-old war he is expanding and affirmed America's commitment to destroying al-Qaida and its extremist allies in the land where the 9-11 plot was hatched.
Obama's six-hour visit was conducted entirely under the shroud of nightfall, after Air Force One's unannounced flight from the U.S. Obama defended his decision to escalate the fight, telling troops whose numbers he is tripling that their victory is imperative to America's safety.
His bid to shore up faith in the struggle was aimed both at the troops who cheered him and Americans back home. And, he demanded accountability from Afghan authorities to make good on repeated promises to improve living conditions, rein in corruption and enforce the rule of law to prevent people from joining the insurgency.
"Your services are absolutely necessary, absolutely essential to America's safety and security," the president told a lively crowd of about 2,500 troops and civilians at Bagram Air Field north of Kabul. "Those folks back home are relying on you. We can't forget why we're here."
It was Obama's first trip as president to Afghanistan, where the number of U.S. troops killed has roughly doubled in the first three months of 2010 compared with the same period last year as Washington has added tens of thousands of additional soldiers to reverse the Taliban's momentum.
"We did not choose this war," Obama reminded the troops, recalling the Sept. 11, 2001, attacks and warning that al-Qaida was still using the region to plan terrorist strikes against the U.S. and its allies. "We are going to disrupt and dismantle, defeat and destroy al-Qaida and its extremist allies."
Obama had gone Friday afternoon to the presidential retreat at Camp David, Md., from which unnoticed departures are easier because of its secluded mountain location. The small contingent of White House aides and media brought on the trip were sworn to secrecy. Obama arrived in Kabul just two days after a threatening new audio message from al-Qaida leader Osama bin Laden, believed to be hiding along the ungoverned border between Afghanistan and Pakistan.
"I thought I'd come over and say hello," Obama told the troops in a jaunty remark that set the stage for stark reminders of the terrorist threat that rose from this soil.
"If this region slides backwards," he said, "if the Taliban retakes this country, al-Qaida can operate with impunity, then more American lives will be at stake, the Afghan people will lose their opportunity for progress and prosperity and the world will be significantly less secure. As long as I'm your commander in chief, I'm not going to let that happen."
That resolve was meant just as surely for stateside citizens as for the people who heard it face to face. Polls find that Americans are divided on the war if, more recently, favorable to Obama's handling of it.
Obama's dark suit was soiled with dust when he stepped off his helicopter at the presidential palace in Kabul. White House officials said Obama, in private talks, wanted to drive home the point that Afghan President Hamid Karzai and his Cabinet must do more to battle corruption and cronyism in government.
Karzai "needs to be seized with how important that is," said Jim Jones, Obama's national security adviser. Karzai has raised eyebrows in Washington with recent trips to Iran, China and Pakistan and his welcoming Iranian President Mahmoud Ahmadinejad to Kabul this month.
In public remarks,Obama told Karzai and his cabinet that he was pleased with progress made since their last discussion by secure videoconference on March 15. Obama invited him to visit Washington on May 12. He also praised recent steps in the military campaign against insurgents. But he stressed that Afghans need to see conditions on the ground get better.
"Progress will continue to be made ... but we also want to continue to make progress on the civilian front," Obama said, referring to anti-corruption efforts, good governance and adherence to the rule of law. "All of these things end up resulting in an Afghanistan that is more prosperous and more secure."
Karzai promised that his country "would move forward into the future" to eventually take over its own security, and he thanked Obama for the American intervention in his country.
He told Obama he has begun to establish more credible national institutions on corruption and made clear he intends to make ministerial appointments more representative of the multiple ethnic and geographic regions of the country, according to a U.S. account of the meeting.
The White House insisted that Karzai's Cabinet participate in most of the meetings with Obama, a way to empower talented administrators who have been marginalized by presidential cronyism.
Jones said: "We have to have the strategic rapport with President Karzai and his cabinet to understand how we are going to succeed this year in reversing the momentum the Taliban and the opposition forces have been able to establish since 2006."
The Afghan government has tried to tackle corruption in the past with little success but Karzai pledged after fraud-marred August elections to rein in graft by making officials declare their assets and giving the country's anti-corruption watchdog more power to go after those accused of misusing their office. This month he gave more powers to an anti-corruption body, including the authority to refer cases to court and act as prosecutor.
Initially, the White House said Karzai had been informed of Obama's impending visit just an hour before his arrival. But Obama's press secretary, Robert Gibbs, said later that the Afghan government was told about the trip on Thursday.
At least 945 members of the U.S. military have died in Afghanistan, Pakistan and Uzbekistan since the U.S. campaign started in late 2001, according to an Associated Press count.
Obama, speaking to troops in a cavernous tent known as the "clam shell," said, "We know there's going to be some difficult days ahead, there's going to be setbacks. We face a determined enemy, but we also know this: the United States of America does not quit once it starts on something. We will prevail, I am absolutely confident of that."
In December, Obama ordered 30,000 additional forces into the fight against the Taliban. Those new U.S. troops are still arriving and most are expected to be in place by summer, for a full force of roughly 100,000 U.S. troops. There were about 34,000 when Obama took office.
AP writers Robert H. Reid and Deb Riechmann contributed to this report.