America’s ability to strike extremist targets in Afghanistan will be significantly constrained once U.S. forces depart this year, making the task of containing terrorism threats extremely difficult but “not impossible,” a top general said Tuesday.

Gen. Kenneth “Frank” McKenzie, commander of U.S. Central Command, told members of the House Armed Services Committee that he is developing plans to address extremist threats in the wake of the withdrawal, which President Biden announced will be completed by Sept. 11, 2021, the 20th anniversary of the terrorist attacks that set off the long U.S. conflict there.

Describing the intense logistical and security challenges the United States may face trying to prevent renewed plots by al-Qaeda or other extremists without a presence on the ground, McKenzie said the military could use long-range missiles, crewed aircraft or Special Operations raids to strike targets when they are located.

“I don’t want to make that sound easy,” McKenzie said of the larger “over the horizon” counterterrorism mission, as military officials call the effort to combat militants from afar. “It’s going to be extremely difficult to do it, but it will not be impossible.”

McKenzie’s annual posture testimony marked the first public comments from a senior military official involved in Afghanistan. The Marine general was among the top brass who advocated for a continued U.S. presence before Biden’s announcement, which the White House said was necessary to comply with the terms of a deal the Trump administration negotiated with the Taliban and also allow the United States to focus on more pressing challenges, including China’s military rise.

Some current and former officials have warned that a U.S. departure could undermine already troubled peace talks and increase the odds of intensified civil conflict or the Afghan government’s collapse, which could allow extremists to flourish and reverse advances in women’s rights and health.

Administration leaders, including Defense Secretary Lloyd Austin, who headed Centcom before retiring from the military in 2016, have countered that al-Qaeda’s diminished state means those risks can be managed from afar and say more acute threats emanate from other countries, including Syria and Yemen.

McKenzie said he had ample chance to describe his views to Biden but declined to say what recommendations he made.

Echoing last week’s assessment from CIA Director William J. Burns, the general characterized an anticipated reduction in intelligence visibility as a chief counterterrorism challenge following the withdrawal. He said the military would move surveillance assets out of Afghanistan as part of its shift toward Asia, despite the fact that more drones would be needed to monitor the country from a distance.

Still, he said, the military would retain visibility. U.S. officials are exploring whether the United States could conduct surveillance flights over Afghanistan from other countries in the region, as it has sometimes done in the past.

McKenzie said the U.S. understanding of events in Afghanistan would also depend on its diplomatic presence there, appearing to raise the possibility the American Embassy might close due to deteriorating security or a hostile local regime. “It will be helpful if we maintain an embassy there,” he said.

Rep. Elissa Slotkin (D-Mich.) drew a potential parallel to Iraq, where the military was forced to return several years after its 2011 withdrawal amid a militant onslaught. McKenzie said he shared her concerns.

“We’re examining this problem with all of our resources right now to find a way to do it in the most intelligent, risk-free manner that we can,” he said. “We’re not going to reenter to reoccupy Afghanistan under any conceivable circumstances.”

McKenzie spoke as other top officials briefed lawmakers on the withdrawal. The sessions seemed to do little to change minds in Congress, where most Republicans remain firmly opposed to the drawdown, and many Democrats have been resolute in their support for Biden’s decision — despite their concerns about Afghanistan’s fate once U.S. troops depart.

“I can’t help but believe that the military advisers all agree that it’s not a good idea,” Sen. James M. Inhofe (R-Okla.), the top Republican on the Senate Armed Services Committee, later said of Biden’s plans, though he acknowledged: “They can’t say that, obviously.”

Democrats emerging from the session with Austin, Secretary of State Antony Blinken, Director of National Intelligence Avril Haines and Chairman of the Joint Chiefs of Staff Mark A. Milley had a different impression.

“Every briefing I’ve ever been to on Afghanistan is depressing,” said Sen. Christopher A. Coons (D-Del.), characterizing the tone officials regularly strike — whether in Washington or in Afghanistan — as “boy, we really hope we can turn this thing around but boy, it’s really hard.”

After members of the Senate Foreign Relations Committee spoke with U.S. Special Representative Zalmay Khalilzad on Monday night, even Democrats who cheered Biden’s decision acknowledged the risks.

Sen. Chris Murphy (D-Conn.) told reporters he was concerned about women’s rights but added that “I don’t think there was any evidence . . . that staying another year was going to fundamentally change the situation.”

Sen. Tim Kaine (D-Va.) acknowledged that since even preserving the status quo in Afghanistan would have required an increase of U.S. troops, conditions could deteriorate as a result of the U.S. exit. But “we cannot want a positive outcome more than the Afghans do,” he said, adding: “the U.S. military has done what it can do.”

Sen. Lindsey O. Graham (R-S.C.) said he had “never been more concerned about the outcome in Afghanistan than now.”

“When we leave, it’s going to collapse,” he said Tuesday after a briefing with Cabinet officials.

Liberal Democrats struck a different tone.

“The president is right. We have the opportunity to get out and we should,” Sen. Bernie Sanders (I-Vt.) said Tuesday. “After 20 years and $2 trillion, the Afghanistan government remains ineffective and corrupt. And, you know, we’ve got to do what we can to stymie the Taliban.”