KABUL, Afghanistan — President Hamid Karzai stood before thousands of Afghan leaders on Thursday in a watershed moment for his tumultuous rule. Having just come to an agreement with American leaders on a security deal that would commit the two countries to a lasting military alliance, and which would surely define his legacy, he convened the assembly that would decide the deal’s fate.

And then, in what has become a signature move, he hit the brakes.

After a speech in which he bluntly described his relationship with the United States as one of mutual distrust, he told the gathering, known as a loya jirga, that even if it approved the deal, he would wait until after the April presidential elections to sign it.

The declaration, which surprised both American and Afghan officials, instantly put at risk an American deadline to have an agreement signed this year. And it served notice that even with his leadership set to expire next year, Mr. Karzai intended for the United States to continue working through him at every turn until then.

The play is not without danger for Mr. Karzai. As American officials’ exasperation with him has intensified, they have increasingly noted the possibility that no American troops — and by extension, no international funding — would be left in Afghanistan after 2014.