Secretary of State John Kerry landed in Kabul, Afghanistan, Friday for talks with President Hamid Karzai.
The United States hopes to make progress on a long-stalled security deal with Afghanistan that would leave some U.S. forces in the country beyond NATO's scheduled departure at the end of 2014.
U.S. officials say they hope to conclude a deal on the Bilateral Security Agreement, or BSA, in the "coming weeks" and before Karzai meets with a council of tribal elders next month.
Without a deal, the United States would keep no military forces in Afghanistan once the combat mission ends.
In Iraq, all U.S. troops left at the end of 2011 after the two countries were unable to reach a similar agreement.
The Afghan negotiations, which started last October, were supposed to be completed within a year.
But issues related to Afghan sovereignty and American security guarantees for that country have made a deal elusive.
Senior U.S. officials tell CNN the text of an agreement is about 95 percent complete, but two main issues remain unresolved.
The sticking points involve Afghanistan's refusal to let U.S. forces conduct counterterrorism operations against al-Qaida operatives.
Karzai wants the United States to hand over intelligence and allow Afghan troops to conduct those operations, something the United States has balked at.
Karzai also is insisting on an American guarantee of Afghanistan's security, similar to agreements the United States would have with a NATO ally or a country with a mutual defense treaty.
Such a pact might compel the United States to send troops into Pakistan if Afghanistan was attacked.
A former Senate Foreign Relations Committee chairman, Kerry has made multiple trips to Afghanistan in recent years.
A state department official who briefed reporters on the way to Kabul said they hope Kerry and Karzai will make progress in the negotiations, but they don't expect to close a deal.
"They will of course be discussing where we are and seek to continue to make progress," the official said. "Now negotiations were ongoing before we arrived and they will be ongoing after we depart from Kabul, so that was not the expectation in terms of a conclusion."
The Afghan leader, known for emotional rants against the United States and NATO forces, cast doubt this week on whether a deal could be reached.
At a press conference, he issued a sharp rebuke to American and NATO forces in his country over a recent NATO airstrike in Nangarhar province that the Afghan government claimed killed five civilians.
"The United States and NATO have not respected our sovereignty," Karzai said. "Whenever they find it suitable to them, they have acted against it. This has been a serious point of contention between us and that is why we are taking issue of the BSA strenuously in the negotiations right now."
Referring to U.S. insistence on handling counterterrorism operations, Karzai said, "The United States and its allies, NATO, continue to demand even after signing the BSA they will have the freedom to attack our people, our villages. The Afghan people will never allow it."
In an interview with Associated Press last week, President Barack Obama warned he would keep troops in Afghanistan only if the United States got want it wanted in any agreement.
Daniel Markey, a senior fellow at the Council on Foreign Relations and author of the forthcoming book "No Exit from Pakistan," says that while the remaining issues are few in number, their importance could hinder chances for a deal.
"These sticking points, even if the differences have been narrowed, are sticky enough that there is some serious question as to whether this will happen before President Karzai leaves office," Markey said.
"And the lack of an agreement will be harmful to the potential legacy of a stable and smooth transition," he added. "There are so many other reasons to be worried about Afghanistan: the economy, the election and the lack of progress in dealing with reconciliation with the Taliban. This is one more thing that doesn't need to be added to the mix."
Washington is racing against two clocks -- one related to Afghanistan's election next April, and the other involving military planning.
Karzai has suggested his successor should be the one to conclude negotiations with the United States. U.S. officials and analysts have voiced concern that Afghans would take to the polls amid uncertainty about the future relationship with the United States.