WASHINGTON — President Barack Obama on Monday warned against "a rush for the exits" in Afghanistan, as questions mount about US war strategy after a US soldier killed 16 civilians in a shooting rampage.

"It's important for us to make sure that we get out in responsible way, so that we don't end up having to go back in," Obama said in an interview with Pittsburgh CBS station KDKA.

"But what we don't want to do, is to do it in a way that is just a rush for the exits."

Obama said the shooting rampage, which mostly targeted women and children, was "absolutely heartbreaking and tragic," but stressed that a withdrawal from Afghanistan involving tens of thousands of troops had to be done responsibly.

"We have got hundreds of advisers in civilian areas as well, we have got huge amounts of equipment that have to be moved out. We have got to make sure that the Afghans can protect their borders to prevent Al-Qaeda coming back."

In a separate interview with Denver CBS affiliate KCNC Obama added that it was "important for us just to make sure that we are not ... in Afghanistan longer than we need to be."

The White House had earlier insisted that its Afghan strategy would not be impacted by the "awful" rampage.

"Our strategic objectives have not changed and they will not change," said White House spokesman Jay Carney, adding the US goal remained defeating Al-Qaeda and empowering Afghans to ensure their own security.

Obama is committed to gradually withdrawing US forces from Afghanistan under an agreement with NATO partners which foresees a full drawdown by the end of 2014.

But a string of incidents, including Sunday's massacre, killing of coalition forces by Afghan troops and riots that followed the burning of Korans by US soldiers has some observers questioning the viability of US strategy.

"This is a challenging time, no question," Carney said, but added that the administration would continue to work on what it sees as vital US national security interests in Afghanistan.

"I don't believe this incident will change the timetable of a strategy that was designed and implemented to allow for the withdrawal of US forces, to allow for the transfer of lead security over to the Afghans," he said.

Carney added that discussions about the pace of the drawdown have been taking place with US allies and will certainly continue at the NATO summit in Chicago in May.

The Pentagon on Monday reiterated that the lone US soldier accused of the house-to-house murder spree would be prosecuted, but ruled out a demand from the Afghan parliament to put him on public trial in Afghanistan.

Investigations and prosecutions of US service members are governed by "agreements in place with the government of Afghanistan," Pentagon spokesman George Little said.

He insisted the US military has "very strong means to address wrongdoing."

Little said the US Army sergeant alleged to have committed the Afghan killings is in his 30s, served three tours of duty in Iraq, and was deployed in Afghanistan for the first time.

"This is an isolated incident and we will pursue accountability for the alleged actions of this service member," he said.

Secretary of State Hillary Clinton added her voice to the revulsion at the killings, after Obama and Defense Secretary Leon Panetta called Afghan President Hamid Karzai to offer their condolences on Sunday.

"This is not who we are and the United States is committed to seeing that those who are responsible are held accountable," said Clinton, speaking at the United Nations. She described the incident as "terrible" and "awful."

But Clinton also sought to ensure that the horror provoked by the attack did not adversely impact already tense relations by Karzai's government and Washington.

"I hope that everyone understands in Afghanistan and the rest of the world that the United States is committed to seeing Afghanistan continue its move toward a stable, secure, prosperous, democratic state."

She acknowledged, however, that after the burning of Korans last month sparked widespread protests "we have had a difficult and complex few weeks in Afghanistan."

The US soldier walked off his base in southern Kandahar province and broke into three village homes before dawn Sunday, killing 16 people including women and children -- an event described by Karzai as "unforgivable."