On Surprise Afghanistan Visit, Obama Assures Troops, 'America Does Not Quit'

President Obama rallied the troops in Afghanistan during his first visit to the country as commander-in-chief today, acknowledging both military successes and personal sacrifices, and noting, "the United States of America does not quit once it starts on something."

He delivered a pep talk of a different kind to Afghan President Hamid Karzai and other Afghan government officials, telling them they need to work harder to combat corruption and other problems within the country.

VIDEO:Presidents Surprise Visit to AfghanistanPlay

During a six-hour trip whose logistics were shrouded in secrecy, Obama's encouragement was more straighforward for approximately 2,000 U.S. and coalition troops and civilians who packed a tent at Bagram Air Force Base. The crowd applauded boisterously and snapped digital cameras as Obama entered clad in a brown leather bomber jacket bearing the presidential seal and shook hands with officials and troops on his way to the podium.

"I want you to understand there's no visit that I considered more important than this visit that I'm making right now," Obama said. "It is a privilege to look out and see the extraordinary efforts of America's sons and daughters here in Afghanistan.

"We can't forget why we're here," he added. "We did not choose this war. This was not an act of America wanting to expand its influence, of us wanting to meddle in somebody else's business. We were attacked viciously on 9/11, when thousands of our fellow countrymen and women were killed."

ABC News video of President Obama speaking to troops in Afghanistan.Play

White House: Afghans Needs to Stay Vigilant on Corruption

Obama's first visit to Afghanistan as president began as Air Force One made a secret landing at Bagram at 10:54 a.m. ET, or 7:24 p.m. local time. Soon afterward, Obama boarded a helicopter bound for the presidential palace in Kabul to meet with the Afghan officials.

"In coming into Kabul, you could see the change in terms of increased electricity production," Obama said after his half-hour meeting with Karzai. "The American people are encouraged by the progress that's been made."

He cited military progress as well but added, "We also want to continue to make progress on the civilian process," including governance, anti-corruption and rule of law.

"All of these things end up resulting in an Afghanistan that is more prosperous and more secure," Obama said.

Gen. James Jones, the U.S. national security advisor, underscored the emphasis on corruption within the Afghan government.

"The president [Karzai] needs to be seized with how important that is," Jones told reporters after Karzai and Obama met.

Karzai has been invited to Washington on May 12 to have a further discussion of long-term strategic interests, officials said.

Karzai said he and Obama today had a "good discussion" on Afghan and regional issues and the continuing struggle against extremism.

He said he wanted to "express the gratitude of our people for the help that America has given us for the last eight years," particularly for U.S. taxpayer funds that have helped rebuild institutions in his country.

Obama previously visited Afghanistan once as a senator, on July 19, 2008, during the presidential general election.

He also made a surprise and secret visit to Baghdad in April 2009, and while in Iraq he addressed U.S. troops at Camp Victory.

Despite complaints about corruption and suspicions about the voting that led to Karzai's re-election in the fall, Jones said Karzai is an "adequate strategic partner" who was democratically elected in a sovereign nation.

Relations between Obama and Karzai are "fine," Jones said before today's meeting, and the two leaders last spoke by video teleconference on March 15.

Obama's Big 'Thank You' to the Troops

Karzai learned on Thursday of Obama's plans to visit Afghanistan, officials said.

"This is something that simply has to be done," Jones said after the meeting. "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."

They may have had to talk to Karzai, but the Obama team sounded decidedly more enthusiastic about addressing the troops and U.S. State Department employees.

"One of the main reasons I'm here is to just say thank you for the incredible efforts of our U.S. troops and our coalition partners," Obama said after meeting Karzai. "They make tremendous sacrifices far away from home, and I want to make sure they know how proud their commander-in-chief is of them."

The Afghanistan visit could help Obama as he continues to press the war, ABC News military consultant Gen. Jack Keane suggested.

"It strengthens his resolve and commitment to see the issue through, that is the war, and it also enables him to establish and continue a relationship with the leaders of Afghanistan," Keane said.

"It surprises [the troops] that he's there," Keane added. "It reinforces everything that they're doing. They always have tremendous admiration and respect, you know, for their commander-in-chief, regardless of what political party."

At Bagram today, Obama told the troops that the feeling from U.S. government officials, regardless of political party, is mutual.

"Sometimes when you're watching TV, the politics back home might look a little bit messy, and people are yelling and hollering, and Democrats this and Republicans that," Obama said. "I want you to know this: There's no daylight when it comes to supporting all of you. There's no daylight when it comes to supporting our troops. That brings us together."

Initially, Obama struck a jovial note as he took the stage at the air base.

"How's it going, Bagram?" he asked, to applause. "It turns out that the American people, they let me use this plane called Air Force One, so I thought I'd come over and say hello."

But his tone changed as he laid out the stakes of the war in Afghanistan.

"Your services are absolutely necessary, absolutely essential to America's safety and security," Obama said.

"This is the region where the perpetrators of that crime [on 9/11], al Qaeda, still base their leadership," Obama said. "Plots against our homeland, plots against our allies, plots against the Afghan and Pakistani people are taking place as we speak right here.

"If this region slides backwards," he added, "if the Taliban retakes this country and al Qaeda can operate with impunity, then more American lives are at stake. ... As long as I'm your commander in chief, I am not going to let that happen. That's why you are here."

He said he would have called the troops home, not sent more to Afghanistan, if he did not think the mission in Afghanistan was important enough to risk American lives.

"You've done your duty -- not just when it's easy," Obama said. "That's why you've inspired your fellow Americans. That's why you inspire me. That's why you've earned your place next to the very greatest of American generations."

Obama-Ordered Troops Are Flowing In

After a lengthy strategy review last fall, Obama announced in December that he was ordering a troop surge in Afghanistan to target insurgents and secure key areas here.

"As commander-in-chief, I have determined that it is in our vital national interest to send an additional 30,000 U.S. troops to Afghanistan," the president said at the U.S. Military Academy at West Point on Dec. 1.

"These are the resources that we need to seize the initiative while building the Afghan capacity that can allow for a responsible transition of our forces out of Afghanistan," he said.

The addition of 30,000 troops would bring the U.S. force in Afghanistan to about 98,000 troops, Gen. Douglas Lute, deputy national security advisor for Iraq and Afghanistan, said today.

There are currently about 80,000 Americans serving in Afghanistan, and the full surge force is expected to be in place by the end of the year.

In addition, there are 40,000 to 50,000 U.S.-allied coalition troops in Afghanistan.

In his December speech, Obama delivered a sober assessment of the security situation in Afghanistan and said the nation had "moved backwards" over the last several years because of the Taliban gaining momentum.

Knowing the concerns of the American people about getting into another open-ended conflict, Obama said that this troop surge would have a deadline -- "After 18 months, our troops will begin to come home," he said -- but said it is necessary to establish conditions for an accelerated transfer of security responsibility to Afghan forces.

"Just as we have done in Iraq, we will execute this transition responsibly, taking into account conditions on the ground," the president said.

The Obama administration laid out a very tight schedule for deployment and withdrawal. American troops began arriving in Afghanistan early this year -- "the fastest pace possible," the president said in December -- and the expectation is that they could begin to come home starting in July 2011.

An ABC News-Washington Post poll in January found that 50 percent of Americans approved of the president's handling of the situation in Afghanistan, down from 63 percent approval in April, while 45 percent of Americans disapproved.

According to a report by The Associated Press, the number of U.S. troops killed in Afghanistan has roughly doubled in the first three months of this year compared to the same period in 2009. There has also been a dramatic spike in the number of wounded, with injuries more than tripling in the first two months of 2010 and the latest data for March suggesting a continuing trend.

Obama's Tough Messages for Afghan President Karzai

In his December speech, Obama outlined how the Taliban and al Qaeda have created instability in Afghanistan, but he also noted that the elected government there has been "hampered by corruption, the drug trade, an under-developed economy, and insufficient security forces."

Obama delivered a blunt, tough message to Karzai and his government: "The days of providing a blank check are over."

"President Karzai's inauguration speech sent the right message about moving in a new direction," he said of last fall's elections in Afghanistan. "And going forward, we will be clear about what we expect from those who receive our assistance."

Obama said the United States will support provincial and district level government and specific ministries, such as those devoted to Afghan security, instead of just sending funds to Karzai's central government.

Today, Jones said there are reasons to be encouraged about Karzai's performance -- pending a full U.S. assessment later this year on Afghan progress toward meeting a series of benchmarks agreed upon with the United States.

But he also outlined three things the United States still wants to see: First, Karzai must lead a merit-based promotion system within his government. Second, Afghanistan must cut off poppy production, the profits from which help sustain insurgent forces. Third, the government must set up a judicial system that can prosecute, try and incarcerate drug traffickers.

"These seeds are firmly planted," Jones said.

Bush Visited Afghanistan Twice as President

Before announcing his new plan for Afghanistan, Obama gathered his national security team on nine separate occasions for lengthy strategy sessions beginning last September.

But he never visited the country while conducting that review.

George W. Bush also visited Afghanistan twice as president -- on March 1, 2006 and Dec. 15, 2008.