More than a year after negotiations began over a long-term security agreement between the United States and Afghanistan, representatives of both countries remain at an impasse over key issues that would allow American troops to remain here beyond 2014.

In explaining their reluctance to conclude an agreement by the October deadline suggested by Americans, Afghan officials say they have “learned their lesson” from previous negotiations with the United States in which they feel they were deceived.

The primary unresolved issues involve the Afghans’ insistence that the U.S. military do more to stem the flow of terrorists from Pakistan and their resistance to unilateral U.S. military operations, said Aimal Faizi, a spokesman for President Hamid Karzai.

Faizi said that an agreement reached last year was supposed to stop unilateral U.S. operations, such as night raids, but that they are continuing — against the will of the Afghan government. He cited as an example an airstrike in the eastern province of Konar that reportedly killed 10 civilians.

“We learned our lesson last time,” he said. “That’s why this is a slower process.”

On Wednesday, officials from the U.S.-led International Security Assistance Force declined to comment on the allegations about unilateral military operations.

This month, for the first time, Karzai will take the lead in negotiations in tandem with U.S. Ambassador James B. Cunningham. Faizi said the Afghan president is hopeful that progress will be made on the two key issues now that talks have reached the highest level.

Under the proposed terms of the post-2014 pact, U.S. troops would be given diplomatic immunity, American officials have said. Such immunity was denied by Iraq’s government in 2011, forcing a complete U.S. military withdrawal from that country.

U.S. officials have long noted the challenge of satisfying Karzai’s demand that Afghanistan be protected from foreign interlopers, including Taliban fighters who enter from Pakistan. An agreement that appears to compel the United States to intervene in Pakistan, disturbing a fragile relationship, would probably not be palatable to the White House.

Faizi said that without a guarantee that Afghanistan would be protected from its neighbors, the agreement “would be hard to sell to the Afghan people.”

U.S. officials had hoped to reach an agreement this month, a prospect that appears increasingly unlikely. Karzai has suggested that he is in no rush to sign the agreement and would be comfortable allowing his successor to complete the pact after presidential elections in April.

“We believe this is a very important agreement . . . and the president has said we should not be in a hurry to sign it,” Faizi said. “If anything goes wrong, he will be held accountable by history.”

The United States and its NATO allies, however, are hoping for time to plan the specifics of their enduring military presence and could balk at signing an agreement if it is not completed soon, according to U.S. officials.