BAGRAM AIR FIELD, Afghanistan - America's top military officer warned that the withdrawal of most U.S. and allied forces from Afghanistan by the end of next year could reverse gains made in the war against the Taliban and further destabilize the region.

But Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, said the United States has no plans to reopen negotiations on the hard-won text.

Dempsey said he hasn't started planning for a so-called "zero-option," but he may have to soon if Hamid Karzai doesn't change his mind and sign the deal.

Much is at stake. Afghan security forces are still struggling against a resilient insurgency despite billions of dollars spent on training during nearly 13 years at war. Instability in Afghanistan, the world's largest illicit producer of raw opium, could also affect the region as far away as Russia.

Such concerns, Dempsey said, are what make Afghanistan important to America and its allies despite waning interest in the conflict at home.

"Were it to become less stable, it would have impact on its neighbors," Dempsey told reporters late Tuesday at this military base north of the capital. "All of us would be concerned about the possibility of ungoverned space producing safe havens for terrorism, so stability in the region is in our national interest."

He said it was important to leave Afghanistan with a functioning government and security forces that can prevent a "reemergence of al-Qaeda and affiliates."

Much of that hinges on the bilateral security agreement that Afghan President Hamid Karzai helped forge but then refused to sign.

The United States wants the deal to be signed by Dec. 31 because it needs time to prepare to keep thousands of U.S. troops in the country for up to a decade. NATO allies also have said they won't stay if the Americans pull out.

The agreement aims to help train and develop the Afghan National Security Forces, and allow for a smaller counterterrorism force to go after stubborn remnants of al-Qaeda and other groups.

The 350,000-strong Afghan forces were holding their ground, Dempsey said, but still need help.

Without a foreign presence, "the development of the security forces will be impeded, will be slowed, and in some parts of the country I suspect could be reversed," Dempsey said.