U.S. President Barack Obama left Afghanistan early Monday after a brief, unannounced visit, in which he pressed the Afghan government to fight corruption and improve governance. Mr. Obama spent less than six hours on the ground during his first visit as president to Afghanistan.

Mr. Obama's first trip to Afghanistan since becoming president came under a cloak of secrecy and darkness, with news organizations learning of the visit only when his plane landed at Bagram Air Base outside of Kabul.  After a helicopter ride into the capital, President Obama and met with his Afghan counterpart at the presidential palace.

At a joint appearance afterwards, Mr. Obama noted that recent months have seen military progress against insurgents.  He added that similar progress must be made on civilian matters - including governance, fighting corruption and extending the rule of law.

President Karzai expressed gratitude for U.S. support during the past year.  In particular, he thanked U.S. taxpayers for "rebuilding and reestablishing" Afghan institutions.

White House officials announced that President Karzai will visit Washington for talks in May.

U.S. and allied forces are working to consolidate their hold on territory in southern Helmand province, and to prepare for battle in Kandahar - the birthplace and spiritual home of the Taliban.

Last year, President Obama announced a significant expansion of U.S. military efforts in Afghanistan, while promising an eventual drawdown of American forces in the country.

U.S. officials have criticized rampant corruption in Afghanistan as well as the country's inability to consolidate democratic rule.  Last year's presidential vote was marred by allegations of fraud.

In Afghanistan, President Obama addressed American troops at Bragram Air Base.  He praised their valor and spoke of the importance of their work in an age of global terrorism. "We are going to disrupt, dismantle, defeat and destroy al-Qaida and its extremist allies.  That is our mission.  And to accomplish that goal, our objectives in Afghanistan are also clear.  We are going to deny al-Qaida a safe haven.  We are going to reverse the Taliban's momentum.  We are going to strengthen the capacity of Afghan security forces and the Afghan government, so they can begin taking responsibility and gain the confidence of the Afghan people," he said.

Mr. Obama added that U.S. efforts also include a critical civilian component to improve living conditions for the people of Afghanistan.

The troop surge is expected to raise the number of American forces in Afghanistan to about 100,000 - almost triple the number deployed when Mr. Obama took office.