KABUL, Afghanistan — America's top general on Monday said he would like to see a security agreement with Afghanistan signed by October to give NATO enough time to prepare for a post-2014 military presence instead of a total pullout.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, also said he has not been asked to prepare for a "zero option," with no American forces in the Afghanistan after 2014.

"Militarily, I would like to understand the future more clearly through the bilateral security agreement, sometime between now and October," Dempsey told reporters.

He said that would give America's allies in NATO a year to prepare for their military presence in Afghanistan post-2014, when all foreign combat troops must leave under the coalition's current mandate.

The United States and NATO want to retain a military presence in Afghanistan after the main pullout. That military force would have as its goal to train, assist, and advise Afghan forces so that they can maintain their own security, and for a smaller counter-terrorism force to go after al-Qaida. If approved, that NATO mission would be called "Resolute Support."

"So October 2013 is about a year prior to that, and militarily, my advice would be that we achieve as much clarity and certainty as possible about a year out from where we would like to be in that configuration, and that would lead me to suggest that October would be the right timeframe," he said.

Dempsey warned that a failure to sign a security agreement would mean that no American forces will remain in the country after the pullout date.

"No one asked me to prepare a zero option. I don't recommend a zero option, but there could be a zero outcome, because we can only stay here if we are invited to do so. And that is why I am so personally committed to doing anything I can do to set the conditions for this bilateral security agreement," Dempsey said.

If the U.S. does not sign the deal, it is unlikely that NATO or any of its allies will keep troops in Afghanistan after 2014.

Two weeks ago, Germany said that its offer to keep hundreds of trainers in Afghanistan was contingent on American and other soldiers being part of the training mission.

Dempsey said no decision had yet been made on the size of the U.S. military presence and that it was still being discussed.

Although President Barack Obama is undecided on how many troops will remain in Afghanistan with NATO forces, it is thought that about 9,000 U.S. troops would join about 6,000 from the U.S. allies.

A decision "will be made soon," Dempsey said.

The U.S. and its allies last month formally handed over control of security to the Afghan army and police. The handover paved the way for the departure of coalition forces — currently numbering about 100,000 troops from 48 countries, including 66,000 Americans.

By the end of the year, the NATO force will be halved. At the end of 2014, all combat troops will have left and will be replaced, if approved by the Afghan government, by the smaller force that will only train and advise the Afghans.

Talks on a the security deal have made little headway after President Hamid Karzai suspended negotiations following a disagreement this month over a Taliban political office in the Gulf state of Qatar that was to host peace talks. The office, which has the support of the United States and other countries, infuriated Karzai after the Taliban opened it using the name and flag the group used when they ruled Afghanistan.

Relations between Afghanistan and the United States plunged after the incident, but Dempsey said his meeting with Karzai Monday went well.

"The conversation was very positive," he said. "I left truly believing that he is as committed as we are to implement the bilateral security agreement."

Karzai's office issued a statement after the meeting that was upbeat and talked about the hope of the Afghan people for peace.

"President Karzai said with that hope, Afghans are ready to sign a security pact with the United States, on condition that it leads to peace and stability in the country, the strengthening of Afghanistan's forces and a united and sovereign Afghanistan," the statement said.

Security is Afghanistan's prime concern as it battles a resilient insurgency after nearly 12 years of war.

Earlier, the Afghan parliament voted in favor of sacking the interior minister, blaming him for worsening security and violence in the country.

The no-confidence measure in Mushtaba Patang, which passed with a vote of 136-60, was non-binding, and Karzai can either accept parliament's decision or reject it. Lawmakers said the minister was not doing enough to provide security along the Kabul-Kandahar highway, a key route that carries much of the nation's trade.

Karzai said in a statement that while he respected the parliamentary decision, he would wait for the Supreme Court to decide whether parliament's reasons for ousting Patang were legal. Until then, Patang would remain as caretaker minister, the statement said.