The US and the Taliban signed a conditional peace agreement in Doha, Qatar on Saturday that could see the steady withdrawal of US forces from Afghanistan and the end of America’s longest-running war.

The deal, which follows a seven-day reduction in violence, commits the US to cutting the number of troops in Afghanistan down to 8,600 within the first 135 days and removing all remaining troops within 14 months of the signing.

The Taliban, however, must “not allow any of its members, other individuals or groups, including al-Qa’ida, to use the soil of Afghanistan to threaten the security of the United States and its allies.”

Visit Business Insider’s homepage for more stories.

The US and the Taliban signed a historic agreement Saturday meant to finally bring an end to the 18-year conflict in Afghanistan, America’s longest-running war.

After more than a year of challenging negotiations amid continued bloodshed in Afghanistan, US Special Representative Zalmay Khalizad, the chief US negotiator, and head of the Taliban’s negotiating team, Mullah Abdul Ghani Baradar, signed the agreement in Doha, Qatar.

Saturday’s signing follows a seven-day reduction in violence, a test to determine if peace was even a possibility.

“Over the past week, we have observed a significant reduction in violence, which has created the necessary conditions for the United States to approve an agreement with the Taliban,” Secretary of Defense Mark Esper said in Kabul, Afghanistan ahead of the signing.

The conditional peace agreement signed Saturday, which could eventually lead to a permanent peace accord, states that the US will, assuming the Taliban lives up to its end of the deal, cut the number of American troops in Afghanistan to 8,600 in the first 135 days. The US, as well as its allies and coalition partners, will withdraw all remaining forces from Afghanistan within 14 months.

In the accord, the US has also committed to working with all relevant parties on a prisoner exchange.

Lees ook op Business Insider Airbus wil in 2035 CO2-neutraal vliegen met deze 3 modellen die van waterstof gebruik maken – eentje lijkt op KLM’s Flying V

An major condition of the agreement is that the Taliban, a militant organization, must “not allow any of its members, other individuals or groups, including al-Qa’ida, to use the soil of Afghanistan to threaten the security of the United States and its allies.”

The war in Afghanistan began Oct. 7, 2001 in response to the Sept. 11, 2001 terrorist attacks, which were executed by al-Qa’ida militants harbored by the Taliban.

Secretary of State Mike Pompeo, who witnessed the signing Saturday, expressed caution, saying that the US “will closely watch the Taliban’s compliance with their commitments, and calibrate the pace of our withdrawal to their actions.”

“This is how (we) will ensure that Afghanistan never again serves for international terrorists,” he added.

Esper was also cautiously optimistic in his comments.

“This is a hopeful moment, but it is only the beginning,” Esper said Saturday. “The road ahead will not be easy. Achieving lasting peace in Afghanistan will require patience and compromise among all parties. We look forward to the coming weeks and months with great optimism, as we advance these important efforts to finally achieve peace.”

While the Trump administration is hopeful, other observers are critical of the agreement.

Former White House National Security Adviser John Bolton, for instance, said on Twitter that “signing this agreement with Taliban is an unacceptable risk to America’s civilian population.”

“This is an Obama-style deal.,” he wrote, adding that “legitimizing Taliban sends the wrong signal to ISIS and al Qaeda terrorists, and to America’s enemies generally.”