* Security tight ahead of major public debate
* U.S. optimistic about future of security pact
* Impasse in negotiations days ahead of grand council
Thousands of Afghan tribal and political leaders will gather in the Afghan capital this week to decide whether to allow U.S. troops to stay after the 2014 drawdown of foreign forces.
The fate of a U.S.-Afghan security deal that will determine whether U.S. forces stay or not is in the hands of 2,500 tribal chieftains and notables who will meet in a giant tent on Thursday for five days of deliberations.
Without an accord on the Bilateral Security Agreement, the United States says it could pull out all of its troops at the end of 2014, leaving Afghanistan's fledgling security forces on their own to fight the Taliban-led insurgency.
Security was tight in Kabul ahead of the Loya Jirga, a traditional Afghan grand assembly convened to debate matters of national importance, following a suicide bomb attack outside the tent over the weekend.
"The Loya Jirga is crucial for the future of our country," said Farhad Sediqqi, a member of parliament who will attend the assembly.
"Afghanistan needs to have a partnership and a pact with the United States."
The meeting comes at a critical juncture for Afghanistan ahead of a presidential election next year and growing anxiety about security as foreign troops prepare to leave.
With the agreement, a U.S. force of between 10,000 and 15,000 will remain in Afghanistan.
Karzai floated the idea of a grand council in order to muster popular support for a security deal opposed by many Afghan politicians and ordinary people.
In the city of Jalalabad, hundreds of students rallied against the pact on Tuesday chanting "Death to America, death to Karzai, long live the Islamic Emirates of the Taliban!"
The Taliban have been waging an insurgency against Karzai and his foreign backers, to force out foreign troops, since 2001 and observers fear the Afghan security forces will struggle once most foreign troops leave next year.
"Through this farce, the Karzai regime wishes to execute the Americans' demands and implement a treacherous deal which in our history will forever be known as national sedition and a criminal act against our nation," the Taliban said in a statement.
Delegates attending the grand assembly appear to be divided on the pact and much will rest on Karzai's opening speech on Thursday, with many likely to take their cue from him.
If the council votes in favour of the pact with the United States, it will still need the approval of both houses of parliament and the president's signature before it is ratified.
Just days before the meeting, sources told Reuters Karzai had rejected a key provision of the pact stipulating whether foreign troops will be able to search Afghan homes, putting the entire deal in jeopardy.
Two years ago, the United States ended its military mission in Iraq with a similar "zero option" outcome leading to the withdrawal of all of its troops after the failure of talks with Baghdad.
The United States appeared optimistic about the Afghan pact.
"We reached general agreement on the BSA when Secretary Kerry was in Kabul last month," said Laura Lucas Magnuson, a spokeswoman for the White House National Security Council.
"Since then discussions have been ongoing with the Afghans to finalise the text ahead of the Loya Jirga. We continue to believe the BSA is in the interests of both countries."