KABUL, Afghanistan — President Hamid Karzai cast fresh doubt on the future presence of thousands of American and allied forces 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 his 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 year’s end.

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 United States 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 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 worked 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..

“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.