President Barack Obama's choice to be the top commander in Afghanistan said Thursday he envisions a U.S. presence in the country after American combat forces leave at the end of 2014, despite a national war-weariness reflected in Congress.

Gen. Joseph Dunford, the assistant commandant of the Marine Corps who has directed combat forces in Iraq, said the two main missions would be counterterrorism and assisting and advising Afghan security forces. Pressed on the size of the residual force, Dunford declined to provide specifics but did say 1,000 troops would be insufficient.

"I believe that advise-and-assist role is an enduring role and would extend past December 2014," Dunford told the Senate Armed Services Committee at his confirmation hearing.

The general's testimony came at a time of extreme change in the administration's national security team and the looming decision on the pace of drawing down the 68,000 U.S. troops in Afghanistan.

Senate Armed Services Committee Chairman Carl Levin, D-Mich., indicated that a decision on the withdrawal timetable could come in a matter of weeks.

Missing from the Senate hearing was Gen. John Allen, the current commander in Afghanistan who has been nominated to take charge in Europe. Allen's nomination is suddenly on hold as he's ensnared in a sex scandal that had led to the resignation of CIA director David Petraeus.

Allen is now the subject of a Pentagon investigation for potentially inappropriate communications.

During his appearance, Sen. John McCain, the top Republican on the committee, asked if U.S. and coalition forces are winning the war in Afghanistan.

"I think we're making progress. ... I believe our objectives are achievable," Dunford said.

The Marine Corps general said crucial for Afghanistan will be elections in April 2014 that will ensure whether the financial commitments of other foreign nations are fulfilled. He also said that they would engender confidence in the country.

President Hamid Karzai has indicated that he would not seek another term.

Looking beyond 2014, Sen. Lindsey Graham, R-S.C., pointed out that Afghanistan does not have an Air Force and would likely need attack helicopters and other airpower as well as intelligence capability.

Several members expressed their doubts about keeping U.S. forces in Afghanistan more than a decade of war that has claimed the lives of more than 2,000 Americans and cost the nation billions of dollars. McCain, one of the strongest proponents of keeping a robust force in Afghanistan, suggested a hard look at the operation.

"If we can't accomplish the mission, I'm not sure why we should stay," he said. "And that is something that I think a lot of us have to wrestle with, because if we're going to start drawing down right away from the 68,000, which I am — know that our military leaders believe is absolutely necessary — then I think we need to look at other options."

Dunford insisted that the United States and Afghanistan must sign a bilateral security agreement by May 2013 to ensure legal protection for Americans who do remain in Afghanistan.