BAGRAM AIR FIELD, Afghanistan — Depicting a grim future for Afghanistan without U.S. help, the top U.S. military officer said Wednesday that Afghanistan’s refusal to sign a security agreement with the United States may make the fight more difficult this year, embolden the enemy and prompt some Afghan security forces to cooperate with the Taliban to “hedge their bets.”

Army Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, spent the day with his commanders and troops in Afghanistan working to manage the after-effects of President Obama’s order Tuesday to begin actively planning for a total withdrawal of U.S. troops by the end of the year. In back-to-back meetings, he urged them to focus on the considerable military work they have to do and not worry about next year.

Dempsey told The Associated Press in an interview that the possible exit of all U.S. troops was making Afghan military leaders anxious and eating away at their troops’ confidence. He said he spoke with some Afghan leaders after the Tuesday announcement, and they asked him to stay committed to an enduring U.S. presence, and told him they were doing all they could to get the agreement signed.

Frustrated with Afghan counterpart Hamid Karzai, Obama ordered the Pentagon to accelerate planning for a full U.S. troop withdrawal from Afghanistan by the end of this year. But Obama is also holding out hope that Afghanistan’s next president, to be elected this spring, may eventually sign a stalled security agreement that could prevent the U.S. from having to take that step.

The administration would like to leave up to 10,000 troops in Afghanistan after combat operations end on Dec. 31 to continue training Afghan forces and conduct counterterrorism missions. But without the agreement that would give international forces legal standing to stay in Afghanistan, Obama has threatened to pull all troops out, and NATO forces would follow suit.

Obama spoke Tuesday with Karzai, the first direct conversation between the two presidents since last June. Karzai has refused to sign the pact.

The impasse is having an effect, Dempsey said.

“It is having an effect on the enemy and in some ways I think encourages them, and intelligence supports that,” Dempsey said. And, he said, the uncertainty of a continued U.S. presence in Afghanistan may encourage Afghan security forces to “hedge their bets.”

“There are parts of the country where it seems to be, there will … be some accommodations between the Afghan security forces and the Taliban,” he said.