The U.S. military’s outgoing top commander in Afghanistan highlighted improvements in the coalition-trained Afghan military on Thursday, but said the Obama administration’s plan to withdraw nearly all U.S. troops by the end of 2016 will weaken the United States’ ability to perform counterterrorism missions there.

Gen. Joseph Dunford, up for confirmation to become the next commandant of the Marine Corps, told the Senate Armed Services Committee that he does not envision that the Afghan military will be “capable of conducting the kind of operations we’re conducting” to put pressure on al-Qaeda and others in the network of extremists threatening security before 2017 when virtually all U.S. troops are gone.

The U.S. withdrawal calls for about 9,800 American troops in Afghanistan by the end of this year, with an additional 4,000 troops from other coalition countries. The U.S. force will include about 2,000 Special Operations troops. The overall number of U.S. troops will be cut in half by the end of 2015, and then reduced again to about 1,000 based at the U.S. Embassy in Kabul in 2016, Dunford said. There will be virtually no U.S. commandos in Afghanistan by 2017, he said.

“In accordance with the plan right now, we would have…a Kabul-centric approach,” Dunford said. “That would reduce our collections capability, our signals intelligence, our human intelligence and our strike capability. So it would be a significant reduction in our overall counterterrorism capability.”

Dunford was called to testify about his plans and outlook for the Marine Corps, but spent a significant portion of the hearing answering questions about Afghanistan, and to a lesser degree, Iraq. He said he has confidence in the “regional approach” the United States has planned in Afghanistan in 2015, but sounded significantly less comfortable about the arrangement afterward.

Currently, there about 7,000 U.S. Special Operations troops in Afghanistan, Dunford said. Some perform counterterrorism missions, while others work with and train Afghanistan’s growing cadre of commandos. By January 2015, Dunford said, the number of U.S. commandos will drop to 3,000.

Under questioning from Sen. Lindsey Graham (R.-S.C.), the general said he does not see how al-Qaeda and groups affiliated with it that hide along the Afghanistan-Pakistan border will be contained so they do not threaten the United States at home. The United States, Dunford said, would be relying on Pakistan and Afghanistan’s military by 2017 to perform any counterterrorism operations.

Graham pressed the issue, asking whether Dunford thought doing so is a “high-risk strategy.”

Dunford agreed that it was “from a CT perspective.”

Dunford added at a different point in the hearing that for the Afghans to be successful in staging counterterrorism missions in 2016, they must address two critical gaps. The first is their “aviation enterprise” — their ability to get troops where they need by air quickly and maintain aircraft. The second is in collecting and analyzing intelligence, which is considered key in finding and striking terrorist safe havens.

“While those are developing, we still expect that the aviation enterprise will still have some capability gaps in 2016, as well as the intel enterprise,” Dunford said. “Those are longer-term challenges that we’re addressing.”

On Iraq, which has been rocked by violence this year as Islamist extremists took control of broad swathes of territory, Dunford said the United States withdrew its forces in 2011 “with the associated consequences.” But he said Afghanistan can be different.

“We knew, when we left Iraq, that there was work remaining to be done, to develop sustainable Iraqi security forces, as well as to ensure that political stability existed in Iraq, such that security and stability would continue,” he said. “In Afghanistan, we have a chance to get that right. And my argument, in fact, is for us to do a responsible transition from Afghanistan, as opposed to a withdrawal.”

Dunford is expected to sail through the confirmation process and take over the Marine Corps sometime this fall. He will replace Gen. James F. Amos, who is retiring after serving as the service’s top officer for four years.