Updated

President Hamid Karzai cast fresh doubt on the future presence of thousands of American and allied forces on Sunday by rejecting a recommendation by an Afghan assembly of dignitaries to quickly sign a long-delayed security pact with the United States.

Although the mercurial leader did not fully spell out his reasons for deferring its signature until after the April 5 elections, the move was a slap in the face to U.S. officials who had repeatedly asked for a deal by the end of the year.

The U.S. administration has insisted the deal be finalized by the end of next month, warning that planning for a post-2014 military presence may be jeopardized if it is not approved.  U.S. Secretary of State John Kerry and Defense Secretary Chuck Hagel both asked last week that it be signed by the end of the year.

Failure to do so could be the final blow to the Bilateral Security Agreement, leaving the Americans without a legal basis to keep forces in the country for up to a decade to train and mentor Afghan troops who remain ill-prepared to face a persistent Taliban insurgency.

The U.S. has said it will pull all its forces out of Afghanistan without it, as it did when Iraq failed to sign a similar agreement. Most of America's allies have also said they will pull out their troops in without the deal, a withdrawal that could put at risk more than $8 billion a year pledged by the international community for Afghan security forces and the country's development.

After negotiators hammered out compromises on several issues, Karzai had called the 2,500 tribal elders and regional leaders to the capital to debate the draft deal in a consultative assembly known as a Loya Jirga.

The four-day assembly had the option of asking for changes or rejecting the agreement. Instead Karzai added a new wrinkle by announcing on the opening day Thursday that he wanted delegates to endorse the deal but he would not sign it.

He repeated that stance Sunday despite the panel's recommendation that he sign before the end of 2013, laying down a series of ill-defined conditions and promising to continue negotiations with the U.S. in a rambling speech that lasted nearly an hour.

"We want security, peace and we want a proper election. You have asked me that I should sign it within a month. Do you think that peace will come within a month?" he asked the assembly. "I want an implementation period for peace to come, if peace won't come, this agreement will cause disaster to Afghanistan."

He did not elaborate, but his spokesman Aimal Faizi said: "Not before elections. He was clear enough."

Normally, following the Loya Jirga, Karzai or his designee would have signed the document and then parliament would have ratified it. Then Karzai would have to again sign the agreement to make it law. It is now unclear if the deal will even go to parliament if the Afghan leader doesn't change his mind.

The U.S. thanked the Loya Jirga for its endorsement but did not comment on Karzai's remarks.

"We are studying President Karzai's speech.  We continue to believe that concluding the BSA as quickly as possible is to the benefit of both nations," U.S. Embassy spokesman Robert Hilton said.

Karzai's relations with the United States have been testy for years, and he often has said one thing only to do another.

"How long he will stay in that mood I don't know, but at the moment our understanding is that he will not go to sign it," said former foreign minister Abdullah Abdullah, who was the runner-up to Karzai in the disputed 2009 presidential election and is the current favorite for next year's poll. "He is a bit unpredictable."

Analysts and politicians said Karzai could be trying to wring more concessions from the U.S. after a difficult process that led to compromises giving Washington legal jurisdiction over U.S. troops and conditionally allowing Americans to raid Afghan homes under "extraordinary" circumstances.

Others speculated the two-term president could be trying to maintain political leverage and influence over the upcoming elections, which he is barred by the constitution from contesting.

"There is the possibility that the president is trying to pressure the United States to back one specific candidate that he wants to be the next president," said Abbas Nuyan, a former member of parliament and member of the Right and Justice party, which opposes Karzai.

Karzai's refusal to sign the agreement angered a number of politicians and delegates, including the chairman of the Loya Jirga who berated Karzai for not heeding the will of the assembly.

"You should sign it, you should sign it for this issue to be over," Karzai's one-time mentor and former president Sibghatullah Mojaddedi said.

In his speech, Karzai repeatedly stressed that the elections were a key date and hinted that he could lose the influence he needs to ensure they are not manipulated if the agreement is signed now.

He has in the past accused the United States of interfering in the 2009 elections, which he almost lost. That election was so soiled that U.N.-backed fraud investigators threw out more than 1 million votes -- enough to force Karzai into a second-round vote. The rerun was later canceled when Abdullah dropped out. Karzai is not contesting the elections, but his brother is.

"We had our election, they defamed us in that election, they called us lots of bad names," Karzai told the Jirga.

Karzai also seemed concerned about his legacy, worried he might be seen as responsible for an agreement that some Afghans will likely see as selling out to foreign interests.

"If I sign it and peace does not come who will be blamed for it by history? If I sign it today and tomorrow we don't have peace, who would be blamed by history. So that is why I am asking for guarantees," Karzai said.