An American official said Thursday night that the American ambassador in Kabul, James B. Cunningham, reported in an internal cable that he did not think Mr. Karzai would agree to sign the accord before Afghanistan’s elections in April. News of the cable was first reported online by The Washington Post.

The Obama administration wants the agreement to be signed soon so that the United States and its NATO allies, who are pursuing a similar agreement, will have time to make plans for a post-2014 force.

“There is not a lot of time left before that planning has to begin,” the White House press secretary, Jay Carney, said earlier Thursday.

But instead of dealing with the security pact, Mr. Karzai’s government appears to be reviving an old dispute. Last year, American officials initially resisted Mr. Karzai’s demands to turn over authority over detainees to the Afghans, saying they were worried that Afghan officials would be too quick to release dangerous militants who would then return to the battlefield. The Americans said Mr. Karzai’s promise that it would not happen that way cleared the path for the security agreement.

On Thursday, Afghan officials said that in ordering the release of 72 detainees, they were following legal procedure because neither American nor Afghan security officials could produce evidence that the men had been involved in killing troops.

“We have the right to release the men,” said Aimal Faizi, Mr. Karzai’s spokesman. “The Americans know very well they do not have anything that is solid against these detainees.” He characterized some of the evidence as being nothing more than fingerprints on guns, noting that almost everyone in Afghanistan owned a gun.

The prisoners are being held near Bagram Air Base at what was the main American prison in Afghanistan. Mr. Faizi said that the exact timing of their release would be up to prison officials and the three-member Afghan detention commission that recommended the move.