Negotiations to set the terms of the U.S. partnership with Afghanistan in the decade after 2014 are faltering as the two countries struggle to bridge the gap between their demands, according to U.S. and Afghan officials.

After months of talks, some of the officials involved are growing increasingly pessimistic about the prospect of a substantive “strategic partnership” declaration anytime soon that would allow for a long-term U.S. troop presence in exchange for protection guarantees for Afghanistan and support for the nation’s security forces. U.S. -led NATO forces are set to leave Afghanistan by the end of 2014.

“I see a situation building that will turn negative,” said Shaida Mohammad Abdali, Afghanistan’s deputy national security adviser. “If the U.S. is really interested in staying in Afghanistan, it must show it practically to the Afghan government and the people. And respond to what we need.”

Both sides see an agreement as important to precluding the kind of abandonment of the country that followed the Soviet withdrawal in 1989. That period of civil war and instability in Afghanistan led to the Taliban takeover and the establishment of a haven for al-Qaeda. The new U.S. ambassador to Kabul, Ryan C. Crocker, said Wednesday that the intention of the negotiations is to set a foundation for a “strong, stable, long-term relationship between our two countries.”

“Is it going to be easy to get to? No,” Crocker told reporters at the U.S. Embassy. “Is it worth trying for? Boy, you bet it is. Because, again, we’ve seen consequences of disengaging, of not seeking that kind of relationship.”

Afghan officials appear particularly worried that as the U.S. troop withdrawal accelerates, Washington’s commitment to paying large sums long into the future to support Afghanistan’s security forces will diminish.

Much of the partnership document has been agreed to, but key sections remain in debate. The Afghans are attempting to use the agreement as the place to set binding deadlines for their assumption of control of detentions and controversial U.S. military nighttime raids. U.S. officials think that such timelines should be based on conditions on the ground and that the partnership declaration is not the forum in which to settle them.

Afghan officials are also demanding more firepower, including F-16 fighter jets and Abrams tanks — equipment that U.S. military officials argue is prohibitively expensive and unnecessary for the young Afghan army.

“We’re not going to buy them jets. We’re not going to buy them tanks,” one U.S. military official said, speaking on the condition of anonymity to discuss the situation candidly.

The Afghans want the United States to fund their security forces well into the future, despite estimates that the cost to Washington of such support in 2014 would be about $8 billion.

The United States is seeking long-term access to military bases for counterterrorism operations and for training and mentoring the Afghan security forces. Although the document does not specify how many bases would be involved, Afghan officials said they are considering four to five regional military facilities in places such as Herat province, along the Iranian border; Mazar-e Sharif in the north; Kandahar in the south; and Jalalabad in the east, toward Pakistan.

U.S. officials also want the Afghan government to commit to reforms such as fighting corruption and strengthening democratic institutions to ensure that American money is not propping up an unpalatable government.

Afghan officials say that by allowing U.S. troops to stay into the future, they are paying a steep price, given the opposition to the idea at home and among their neighbors. They insist that they need binding commitments, not vague language, about what they will get from the U.S. government in return.

“President Karzai wants to have a strategic partnership. He is all for it. But he wants the nation to buy it,” said one senior Afghan official who is close to Karzai. “Why can we not have the simplest equipment for national defense — the aircraft and tanks and those things? . . . You see the vulnerability of this nation.”

At one point, U.S. officials hoped a partnership agreement could be signed before President Obama’s announcement that U.S. troops would begin withdrawing, to counter any impression that the United States was abandoning Afghanistan. But the negotiations stalled before the announcement was made last month, and officials say they do not know when an agreement might be reached.

Crocker said he envisions the declaration as a “broad compact” that would outline principles of cooperation in a variety of areas, including support for education, science and technology, and economic and commercial ties.

But Afghanistan’s national security adviser, Rangin Dadfar Spanta, told the parliament this week that there is no certainty that a deal will be reached. Any agreement should “not be a statement but a contract,” he said. U.S. officials also appear discouraged about the prospects.

“There is still a distance to go,” then-U.S. Ambassador Karl W. Eikenberry said last week.