Updated

Democratic presidential candidate Barack Obama pledged steadfast aid to Afghanistan in talks with its Western-backed leader and vowed to pursue the war on terror "with vigor" if elected, an Afghan official said.

On the second day of an international tour designed to burnish his foreign policy credentials, Illinois Sen. Obama and a pair of colleagues held two hours of talks Sunday with President Hamid Karzai at his palace in the capital.

Obama has chided Karzai for not doing more to build confidence in his government, which remains weak after the ouster of the Taliban in 2001.

He made no public comment after the meeting, but said in a written statement that his main purpose was to see U.S troops, thank them for their "extraordinary service" and let them know the United States is proud of them.

Obama said he and his colleagues were talking to military and diplomatic leaders, and Afghanistan's leaders about whether the U.S. has the right strategy and resources to defeat the Taliban and al-Qaida.

"Our message to the Afghan government is this: We want a strong partnership based on 'more for more' — more resources from the United States and NATO, and more action from the Afghan government to improve the lives of the Afghan people," Obama and Sens. Chuck Hagel, a Republican from Nebraska, and Jack Reed, a Democrat from Rhode Island, said in a joint statement. "We need a sense of urgency and determination.

"We need urgency because the threat from the Taliban and al-Qaida is growing and we must act; we need determination because it will take time to prevail," they said. "But with the right strategy and the resources to back it up, we will get the job done."

The Afghan presidency said Obama's message was positive.

"Sen. Obama conveyed ... that he is committed to supporting Afghanistan and to continue the war against terrorism with vigor," said Humayun Hamidzada, Karzai's spokesman. He said no matter who wins the U.S. elections, Afghanistan will have a very strong partner in the United States."

The three U.S. senators traveled later Sunday to Kuwait City, where they met with Kuwait's emir, Sheik Sabah Al Ahmed Al Sabah, and other senior officials, the Kuwait News Agency reported. The delegation was then moving on to Baghdad for meetings with commanders of the U.S. war in Iraq.

Obama has made Afghanistan a centerpiece of his proposed strategy for dealing with terrorism threats. The Illinois senator has said the war in Afghanistan, where Taliban and al-Qaida-linked militants are resurgent, deserves more troops and more attention as opposed to the conflict in Iraq. Both Obama and his Republican rival for the presidency, Sen. John McCain, advocate sending more forces to the country.

In an interview broadcast Sunday in the United States, Obama described the situation here as "precarious" and "urgent," and said the U.S. should not wait to begin the planning that would be needed to send in more troops. As troops sent to Iraq as part of the buildup of forces there begin to leave, Obama says one to two brigades should be redirected to Afghanistan to bolster efforts here.

"The situation is precarious and urgent here in Afghanistan and I believe this has to be our central focus, the central front in our battle against terrorists," Obama told CBS News. "If we wait until the next administration it could be a year before we get those troops on the ground."

While officially part of a congressional delegation on a fact-finding tour, Obama traveled in Afghanistan amid the security accorded a likely Democratic nominee for president rather than a senator from Illinois.

Media access to him was limited, and his itinerary was closely guarded.

Earlier Sunday, he praised U.S. troops during breakfast with soldiers at Camp Eggers, a heavily fortified military base in the city.

"To see young people like this who are doing such excellent work, with so much dedication ... it makes you feel good about the country," Obama said.

"I want to make sure that everybody back home understands how much pride people take in their work here and how much sacrifice people are making. It is outstanding," he said in footage filmed by the military and obtained by The Associated Press.

The trip is Obama's first overseas since he secured the Democratic nomination last month. He is scheduled to travel through Europe this week and give a speech on the U.S.-German partnership and trans-Atlantic relations in front of the gold-topped Victory Column, or Siegessaeule, in downtown Berlin.