Updated

The top U.S. diplomat in Kabul and a campaign adviser to President Barack Obama said Sunday the U.S. isn't rethinking its commitment to Afghanistan after violent protests left more than two dozen people dead, including two American shot inside a government ministry.

U.S. Ambassador Ryan Crocker and Robert Gibbs, Obama's former press secretary, said they believe Afghan President Hamid Karzai's fragile government could collapse and the Taliban would regain power if the U.S. were to walk away.

"This is not the time to decide that we're done here," said Crocker. "We have got to redouble our efforts. We've got to create a situation in which al Qaeda is not coming back."

"What the president's trying to do now is get us to a point where we can hand off the security of Afghanistan to the Afghans and that we can bring our troops home," Gibbs said.

Their comments echoed arguments made by the Bush administration at the height of violence in Iraq, even as popular support for that war was waning. As in Iraq, American voters are questioning the utility of the decade-long Afghan conflict and whether a stable government there would be worth the loss in U.S. blood and treasure.

More On This...

"If we decide we're tired of it, al Qaeda and the Taliban certainly aren't," said Crocker, who served in the Bush administration as ambassador to Iraq.

Obama apologized last week to Karzai for what U.S. officials say was an inadvertent burning of Afghan religious materials, including Korans, at Bagram air base north of Kabul. Still, the incident fanned anti-Western sentiment across the country.

On Saturday, a U.S. lieutenant colonel and a major were found shot inside a heavily guarded Afghan ministry. The Taliban claimed responsibility and said it was retaliation for the burnings. The incident prompted the unprecedented recall of NATO personnel working inside Afghan ministries, dealing a serious blow to the U.S. goal of rebuilding the Afghan government through mentoring.

Obama's political opponents have seized on the series of events to cast doubt on the president's handling of the war, aligning themselves with voters frustrated by the slow progress.

GOP presidential candidate Newt Gingrich said that if Karzai "doesn't feel like apologizing then we should say good bye and good luck, we don't need to be here risking our lives and wasting our money on somebody who doesn't care."

Republican hopeful Mitt Romney said he supports a continued U.S. military presence in Afghanistan, but. said the recent shootings were proof that efforts to rebuild Afghanistan weren't going well.

"It's an extraordinary admission of failure for us to establish the relationships that you'd have to have for a successful transition to the Afghan military and Afghan security leadership," Romney said.

Crocker defended Kabul's reaction to the protests and said Afghan security forces are working to quell the protests.

"They've done so with loss of life on their side as well as some of the protesters, and they have been defending U.S. installations," Crocker said. "So they are very much in this fight trying to protect us."

Sen. John McCain, the top Republican on the Senate Armed Services Committee, said he agrees with Crocker that the U.S. can't leave yet. In fact, he said Obama should replace his timeline to withdraw troops with a longer-term agreement with Kabul to keep the country on track.

"Have no doubt, that if Afghanistan reverts to a chaotic situation, you will see al-Qaida come back and it again (will) be a base eventually of attacks on the United States of America," he said.

At a NATO summit meeting in May in Chicago, the alliance and Karzai intend to determine the path to turning over full security responsibility to the Afghan government by the end of 2014.

Crocker, Gibbs and McCain spoke on CNN's "State of the Union." Romney was on "Fox News Sunday."