An Afghan assembly will decide next month on a proposal that would allow the U.S. military to keep key bases and troops in Afghanistan after 2014, when all foreign combat forces are set to leave.

The assembly, known as the loya jirga, is scheduled to start Nov. 19 and could last up to a week, allowing 3,000 participants to deliberate on the 32 pages of the proposed pact, said Sadeq Mudabir, a senior organizer of the gathering.

The two chambers of parliament will take part in the jirga. Lawmakers will consider the jirga’s decision if the assembly advises Afghan President Hamid Karzai to sign the agreement.

Afghan and U.S. officials have spent months negotiating the pact, known as the Bilateral Security Agreement, which would allow the future American military presence. The proposed agreement has drawn opposition from several of the region’s powers.

The agreement was at the top of the agenda in Kabul last week in discussions between U.S. Secretary of State John F. Kerry and Karzai.

During the meeting, Karzai, who will have to leave office in April and is regarded by some critics as an American puppet, said that only the loya jirga has the authority to decide on the future of the post-2014 U.S. military presence because of a sensitive provision in the deal that would continue to grant legal immunity from Afghan law to American troops.

Washington has long said that without that immunity, it will withdraw all U.S. troops despite the Taliban’s resurgence.

Lawmakers interviewed last week said they will vote in favor of the pact if the U.S. military agrees to respect Afghanistan’s jurisdiction and its sovereignty.

A similar deal in Iraq fell apart in 2011 when U.S. officials were unable to reach an agreement with the Iraqis on the same issue, prompting the United States to pull its troops out of the country.

Afghanistan relies heavily on Western aid, and billions of dollars in funding for its security forces and development would be at stake if the negotiations collapse.

The Taliban has warned that it will continue fighting if the United States keeps troops and bases in Afghanistan.