President Hamid Karzai set the conditions for his country’s strategic partnership with the United States on Wednesday, saying that Afghanistan would allow long-term U.S. bases here as long as American troops stop conducting operations at night, searching homes and detaining Afghans.

Karzai’s comments came at the opening of a large assembly, known as a loya jirga, that drew more than 2,000 delegates from across the country to discuss Afghanistan’s future relationship with the United States, as well as the prospect of negotiating with the Taliban.

“We want to have a strong partnership with the U.S. and NATO, but with conditions,” Karzai said. “We want our national sovereignty and an end to night raids and to the detention of our countrymen.”

Karzai flew by helicopter from his palace to the jirga venue across town, a sign of the level of concern about possible Taliban attacks during the conference, which is scheduled to run for at least four days. Afghan security forces blocked several roads in Kabul and searched cars and pedestrians for explosives. Government offices and many shops were closed.

The grand council has been dogged by controversy since it was announced. Karzai’s opponents suspect ulterior motives behind the conference, such as boosting momentum for him to change the constitution and run for a third term, a move he has publicly ruled out.

They also consider the jirga, a traditional Afghan forum for resolving disputes and generating consensus, a way for Karzai to raise the appearance of popular support for his agenda with Washington, in this case an effort to sign a partnership deal that would outline the terms of the relationship in the decade after 2014. The tribal elders and local leaders from across the country will debate the merits of that plan in coming days.

The United States and Afghanistan have been negotiating the partnership document for months. Washington wants long-term bases in Afghanistan for training and counterterrorism missions. The Afghans want U.S. funding for their security forces and more control over how the U.S. military operates here. Karzai has criticized American troops, saying they have intruded in Afghans’ lives, killed civilians and arrested innocent people.

“The U.S. wants military installations from us. We will give those to them. But we have conditions for this,” Karzai said in his speech. “We will benefit from this. Our soldiers will be trained. Our police will be trained. We will benefit from their money.”

Among the conditions, Karzai said, are that the night raids and house searches must stop and that U.S. troops should no longer be able to detain Afghans. “They have no right to take prisoners,” he said.

He also called for an end to “parallel structures,” a favorite term of his that often refers to the coalition-run provincial reconstruction teams. Karzai has criticized the PRTs for sapping power from the provincial governments as they dole out millions of dollars for development projects.

“The relations between us and America should be the relations between two sovereign nations,” he said.

Karzai’s speech was greeted with some disappointment among U.S. officials in Kabul. The conditions he set, particularly the end of night raids, they said, do not suggest that a strategic partnership agreement will be completed anytime soon.

The U.S. military insists that the Special Operations missions are a crucial tool for killing and capturing insurgent commanders. Part of the rationale for wanting long-term bases in Afghanistan is to preserve the ability of U.S. troops to conduct targeted missions to prevent the country from becoming a sanctuary for terrorists.

Special correspondents Sayed Salahuddin and Javed Hamdard contributed to this report.