President says small military presence offers best hope of stability, but suggests pact should be signed by his successor

The Afghan president, Hamid Karzai, has reluctantly urged his countrymen to let US forces stay on in the country for another decade, saying that although there is no trust between him and Washington, a small American military presence is Afghanistan's best hope of stability.

But Karzai told a grand assembly gathered to vote on a draft security pact between the two nations that even if they approve it, he might leave the deal to be signed by his successor as president next year. This is likely to unnerve American officials who want their future role settled.

White House spokesman Josh Earnest said Barack Obama wants the security pact approved and signed by Afghanistan's government by the end of this year. "We hope that they will move quickly to approve the text of that agreement," Earnest said. US defence secretary Chuck Hagel told reporters that Karzai's move "puts the United States in a very, very difficult position".

"Until we get that BSA (bilateral security agreement), we can't do any more than train and it really needs to be done by the end of this year," Hagel said.

It was not clear how serious Karzai was about a delay. A master of brinkmanship, the Afghan leader has used ultimatums to squeeze concessions from his western backers in the past, but has also smoothly stepped away from red lines when sensing defeat, including bowing this year to a US demand that its troops be granted immunity from the Afghan judicial system.

Addressing 2,500 delegates gathered from across Afghanistan for the loya jirga – a hybrid of tribal tradition and modern referendum – Karzai urged them to think of future generations.

"Where is the advantage in this agreement? Why should we sign it?" he asked a gathering where a mix of turbans and striped silk chapan coats, pakool hats from the Panjshir valley and colourful headscarves showcased the country's diversity. "It gives us the opportunity to move from our current situation to a stable situation," he said.

Karzai read out to delegates a letter he said came from Obama, promising respect. "We will continue to make every effort to respect the sanctity and dignity of Afghans, in their homes and in their daily lives, just as we do for our citizens," a copy shared by presidential aides read.

Members of the Afghan loya jirga attend a gathering in Kabul. Photograph: Omar Sobhani/Reuters

There was high drama before the opening, with the wording of the deal only pinned down hours before the crowd flooded into the purpose-built hall, thrown up a few years ago to replace a recycled Oktoberfest tent that hosted the first loya jirga after the Taliban's fall.

The bilateral security agreement paves the way for up to 15,000 foreign troops, more than half of them American, to stay on in nine bases across Afghanistan until 2024.

Nato combat forces will leave at the end of next year, and the agreement is vital to ensuring Afghans get the funds and training they need to support a relatively weak military. The US troops will also use their bases to chase al-Qaida and linked groups along the Pakistani border.

Although the loya jirga technically has a deciding vote on the future of the deal, the four-day meeting is expected to be more political theatre than a real test, as Karzai, with one eye on his legacy, seeks to spread the political risk of signing off on a long-term US presence.

"What comes out pretty clearly when you talk to people who are on the organising committee or ordinary delegates [is that] pretty much everyone is in favour of the Americans having a troop presence. Not absolutely everyone, but there is a surprising consensus," one western diplomat said."If that's the overwhelming picture, then surely Karzai is going to get that through in some way."

The elaborate choreography of Karzai's opening speech was briefly interrupted by a senator from western Afghanistan who accused him of selling out the country with a deal to allow US forces to enter Afghan homes in "exceptional circumstances" when their lives are at risk.

"Every situation is serious for them," said Belquis Roshan. "All those people who have been killed by American soldiers were exceptions."She was escorted out of the room by security, and two later interruptions from the crowd were to praise the president, one with shouts of: "Long live Karzai!"

The question of whether foreign soldiers should be allowed to enter Afghan homes on military missions, considered a gross violation of privacy here, had been the cause of last-minute delays to the draft and was a main focus of Karzai's speech.He Karzai had originally called for an absolute ban, unless the US apologised for past mistakes, but eventually conceded to Washington's demands.

It may have been heartfelt, as Karzai has long been a staunch advocate of barring western soldiers from Afghan houses, but it was also politically astute before a conference at which delegates include the relatives of civilians killed by both the Taliban and Nato forces.

The dispute shifted the focus of his speech away from the US requirement that their troops have immunity from the Afghan judicial system, which is highly emotive.

The Afghan leader said he had canvassed regional powers, including India, China and Russia, as well as the government of Pakistan and all of them except Iran had urged him to sign the security pact for the sake of Afghanistan's future.

He finished what is likely to be one of the most significant speeches of his career with a familiar political appeal, to delegates' concerns for their children. His own son, he said, had learned the words "ministry of defence" as a toddler, after the building near the palace came under attack. "In what country is that normal?" he said. "It will be better for our future if we sign this agreement."

Mokhtar Amiri contributed reporting