A deal 18 months in the making is set to end 18 years of war in Afghanistan. On Saturday, U.S. Special Representative Zalmay Khalilzad and Mullah Abdul Ghani Baradar, head of the Taliban, signed a peace deal in Doha, Qatar, intended to deescalate conflict in Afghanistan over the coming months.

“The Taliban will not allow any of its members, other individuals or groups, including Al Qaeda, to use the soil of Afghanistan to threaten the security of the United States and its allies,” the agreement reads.

The U.S. will begin withdrawing its troops from the region and will have removed all of its military presence within 14 months, according to the terms of the deal. It will also support local civilian personnel and the personnel of Afghanistan’s allies. Troop numbers are expected to drop down to 8,600 from around 13,000 within the first 135 days. The U.S. will also work to remove Taliban members from its sanctions list by May 29.

“We owe a debt of gratitude to America's sons and daughters who paid the ultimate sacrifice in Afghanistan, and to the many thousands who served over the past nearly 19 years,” General Mark A. Milley, chairman of the Joint Chiefs of Staff, said in a statement.

The government of Afghanistan and the Taliban will be releasing prisoners — 5,000 and 1,000, respectively — in a show of goodwill. The government will also begin negotiating with the group within the next month in order to determine how to achieve a ceasefire and how the Taliban will be integrated into the country going forward.

The conflict between the U.S. and the Taliban began when the group provided shelter for Al Qaeda, the terrorist group responsible for the 9/11 terrorists attacks that killed 3,000 people. In the 18 years since then, roughly 2,300 U.S. troops have been killed in Afghanistan with countless more injured. Additionally, an estimated 58,000 Afghan security forces were killed between 2001 and October 2018.

“The only responsible way to end the war in Afghanistan is through a negotiated political settlement,” Milley added. “Today is a reflection of the hard work of our Nation's military, the U.S. Department of State, intelligence professionals, and our valued partners. The United States is committed to the Afghan people, and to ensuring that Afghanistan never becomes a safe haven for terrorists to threaten our homeland and our Allies.”

Members of the Taliban delegation gather ahead of the signing ceremony with the United States in the Qatari capital Doha
Members of the Taliban delegation gather ahead of the signing ceremony with the United States in the Qatari capital Doha AFP / Giuseppe CACACE