He also said the United States was bringing an international trade case against China over the supply of rare-earth materials for batteries.
"We have a strategy that will allow us to responsibly wind down this [Afghan] war," Obama said. "We're steadily transitioning to the Afghans who are moving into the lead. And that's going to allow us to bring our troops home. Already we're scheduled to remove 23,000 troops by the end of this summer ... following the 10,000 that we withdrew last year. And meanwhile, we will continue the work of devastating al-Qaida's leadership and denying them a safe haven.
"There's no question that we face a difficult challenge in Afghanistan, but I am ... confident that we can continue the work of meeting our objectives, protecting our country and responsibly bringing this war to a close."
Obama said, "Today I'll be meeting with Prime Minister Cameron, who's part of our broad coalition serving in Afghanistan, and we'll have an opportunity to consult about the way forward as we prepare for the NATO summit in Chicago later this spring."
An Afghan soldier died Tuesday in an attack by militants on a delegation visiting the area where a U.S. soldier is accused of killing 16 people, officials said.
Adubl Rahim Ayobi, a lawmaker from the Panjwai district of Kandahar province, where Sunday's shooting spree occurred, said government officials were attacked as a memorial service was drawing to a close, The New York Times reported.
"A few bullets landed in the vicinity of the area where the delegation was sitting," Ayobi told the Times in a telephone interview. "The security forces repelled the attack and are chasing the insurgents."
The delegation included two of President Hamid Karzai's brothers, Afghan Army Chief of Staff Gen. Shir Muhammad Karami and Deputy Interior Ministry Gen. Abdul Rahman Rahman.
There was no immediate claim of responsibility.
During the visit, the delegation paid compensation to the wounded and the families of those killed. Each death was compensated with about $2,000 and each wounded person received about $1,000.
The U.S. government indicated it also would pay compensation.
Hundreds of protesters closed a highway running from Jalalabad in eastern Afghanistan to Kabul Tuesday to protest the killings.
Ahmad Zaii Abdulzai, a spokesman for Jalalabad Naghar province, said the protesters, many of them university students, "have taken to the streets" in Jalalabad near Pakistan's border with Pakistan, CNN reported.
A U.S. Army staff sergeant is suspected of leaving his base and going door to door, killing nine Afghan children, three women and four men in two villages.
In a statement issued Tuesday, the Taliban said they would avenge the deaths "by killing and beheading Americans anywhere in the country."
Leaders from across Afghanistan have expressed outrage over the attack in Kandahar province, a Taliban stronghold.
In Washington, President Obama and others in his administration have expressed sorrow and vowed an investigation while insisting the U.S. mission in Afghanistan would not be altered.
Concerns have been expressed that Sunday's killings could reignite the anger that led to deadly riots against international forces in February over the burning of Korans by U.S. troops, the latest in a series of incidents that have strained already tense relations between the United States and Afghanistan.
As he left for a trip to the Middle East Monday, U.S. Defense Secretary Leon Panetta said the United States and its NATO allies "seem to get tested almost every other day."
But he added, "It is important that, all of us, United States, Afghanistan, the [International Security Assistance Force] all stick to the strategy that we've laid out."
The still-unidentified suspect in the attack was serving his first tour in Afghanistan after being deployed to Iraq three times, said Gen. John Allen, the U.S. and NATO commander in Afghanistan.
"The evidence at this point, both in terms of observations and reports and interviews, leads us to believe that he acted as an individual at this point," Allen said.
In 2010, the suspect was diagnosed with a traumatic brain injury after a vehicle in which he was riding rolled over in a crash, a senior Pentagon official told CNN. He was found fit for duty after treatment, the official said.
Allen said the suspect's medical history would be part of the investigation being handled by U.S. military authorities.
Duggar sisters unveil Christian dating rules in new book
Astronomers offer more expansive view of universe