During Surprise Trip to Afghanistan, Obama Thanks U.S. Troops for Their Service

President Obama personally thanked U.S. troops for their service during a surprise trip to Afghanistan on Friday as casualties mount since the president escalated the war last year.

In a speech to several thousand troops inside a hangar at Bagram Air Field, Obama declared that the troops are making important progress in the country and will succeed in the U.S. mission.

"We'll never left Afghanistan be a safe haven for terrorists to attack America," he said, adding that he didn't need to tell them it was a tough fight and difficult days are ahead.

Under intense security, Obama landed in night's darkness after a clandestine departure from the White House on Thursday, where plans of his trip into the war zone were tightly guarded.

The White House said rough weather forced the president to abruptly scrap his plans to meet Afghan President Hamid Karzai in the capital of Kabul. The White House determined the wind, dust and cloud cover made it unsafe for the president to fly by helicopter from the huge military complex in Bagram Air Field to the presidential palace.

In a rapidly changing sequence of events, the White House then said they would speak by secure videoconference -- but later said that, too, was dropped. Instead, the two leaders were expected to speak by phone.

In total, Obama was to spend three hours on the ground in Afghanistan, about half the time he had scheduled.

Casualties have been on the rise since Obama deployed 30,000 troops to Afghanistan, with all of them in place by this summer. The higher casualty numbers reflect heavier fighting, especially in the south and east, as NATO forces push deep into insurgent strongholds in a bid to help Karzai's government gain control of more areas of the country and reverse the Taliban's momentum in the nine-year war.

The secret trip has been in the works for more than a month. National Security aide Ben Rhodes said Obama wanted to go to Afghanistan between Thanksgiving and Christmas.

"It's always tough to serve in harm's way but when you're away from loved ones in the holiday season it's particularly hard, and the president wanted the ability to come out and have some time with them," Rhodes said.

Rhodes said the scrapping of the personal visit with Karzai would not have consequences because the two just met at a NATO summit in Lisbon two weeks ago.

Obama's visit to Afghanistan is his latest trip abroad since his party took a beating in the midterm elections last month. After Republicans captured the House and increased their ranks in the Senate on Nov. 2, Obama took a 10-day, four-country trip to Asia that produced setbacks -- he failed to secure a highly sought-after free trade agreement with South Korea and couldn't rally wide-ranging international support for action against China's currency manipulation.

Then he traveled to a NATO summit in Portugal where he was seen as playing a pivotal role in the alliance securing agreements on the Afghanistan war and missile defense.

Before the election, Obama spent just three days abroad this year, having traveled to the Czech Republican and Afghanistan in April. The recent burst of activity on the foreign policy front threatens to overshadow the president's promise to shift focus to the economy.

The government reported on Friday that the economy produced a lackluster 39,000 jobs in November, pushing the unemployment rate up to 9.8 percent, a seven-month high. Economists had forecast a gain of 145,000 jobs.

Obama's visit also comes at a particularly awkward moment in already strained U.S. relations with Afghanistan. Leaked U.S. cables show American diplomats portraying Afghanistan as rife with graft to the highest levels of government, with tens of millions of dollars flowing out of the country and a cash transfer network that facilitates bribes for corrupt Afghan officials, drug traffickers and insurgents.

A main concern in the cables appears to be Karzai himself, who emerges as a mercurial figure. In a July 7, 2009, dispatch, U.S. Ambassador Karl Eikenberry describes "two contrasting portraits" of the Afghan president.

"The first is of a paranoid and weak individual unfamiliar with the basics of nation building and overly self-conscious that his time in the spotlight of glowing reviews from the international community has passed," the cable says. "The other is that of an ever-shrewd politician who sees himself as a nationalist hero. ... In order to recalibrate our relationship with Karzai, we must deal with and challenge both of these personalities."

The Associated Press contributed to this report.