A security pact with the US, which is critical to Afghanistan's ability to pay its soldiers and hold off the Taliban, is in limbo, after President Hamid Karzai shrugged off the recommendations of a national council that has approved the deal and said he would continue talks with Washington.

After a year of negotiations, the Loya Jirga, or grand assembly, of 2,500 delegates approved the agreement to keep US troops in the country after the current combat mission ends in 2014.

But Karzai stunned US diplomats and many of his own security officials when he told the opening session of the jirga that the bilateral security agreement should not be signed until after presidential elections in April.

Washington quickly announced that a deal had to be agreed by the end of the year, but on Sunday Karzai said that the US had to prove its good intentions by keeping its soldiers out of Afghan homes, ensuring the vote was transparent and promoting peace talks with the Taliban.

"If I sign and there is no security, then who is going to be blamed for it?" he told delegates, who interrupted his speech several times to both question and support him.

The agreement will allow US soldiers to stay on at nine bases, mentoring the still ill-equipped and patchily trained Afghan police and army, and pursuing al-Qaida and linked groups.

It is politically sensitive for many reasons, not least because it undermines Afghanistan's reputation as the "graveyard of empires", with the ignominious withdrawal of Soviet forces referenced several times in jirga speeches on Sunday.

But without a deal, the US is unlikely to part with the $4bn (£2.50bn) a year needed to pay the Afghan army, or provide the helicopters and other equipment promised.

Many Afghans feel that the imperfect deal is the only protection they have against powerful neighbours. One of Karzai's security advisers warned parliament that without the agreement the country would be isolated "among wolves", and his military chief asked opponents of the deal to say where else they would come up with police and army funding.

At the end of the Loya Jirga, which has no legally binding powers, a string of delegates came up to the podium to commend the deal, some to ask for small changes, but the majority to urge Karzai to sign the agreement by the end of year.

Karzai chose to ignore those requests, warning his audience that "Afghanistan has always won the war but lost in politics". He added that he planned to carry on with negotiations because the US had broken previous commitments to protect the country and support the peace process.

"Lack of trust is the core of the problem," his spokesman, Aimal Faizi, said before the speech, adding that Karzai thought American officials were bluffing when they warned of a total pullout by the US. "We don't believe there is a zero option," he said.

But many in Washington and Afghanistan fear Karzai is underestimating the exhaustion of both the US public and the Obama administration with a long and costly war, and that he is taking a huge risk by delaying the deal.

After Karzai finished, Sebghattulah Mojaddidi, the chairman of the gathering, took to the podium again to give an emotional speech aimed at the leader who he said is like "my own child".

Afghanistan had kicked out a superpower before, Mojaddidi said, and could do the same if they did not stick to their side of the deal. "This is good for us. If the Americans don't follow the agreement, I will be responsible."

Mojaddidi warned that he would go into voluntary exile if Karzai did not sign the deal.

The US embassy in Kabul declined to comment on the status of the agreement. "We are studying the president's remarks. We continue to believe that concluding the agreement as soon as possible is in the interests of both nations," a spokesman said.