Just as a historic peace agreement was being signed in Qatar on Saturday to end American’s longest-fought war, the United States Secretary of Defense Mark Esper and NATO Secretary General Jens Stoltenberg renewed their commitment to Afghanistan.

During a ceremony of a joint declaration with President Ghani, US Defense Secretary Esper said the United States had a “longstanding commitment” to Afghan security forces. Esper commended Afghan security forces for spearheading the war against insurgency and reaffirmed the U.S. continued support to the armed forces.

He reckoned that a political settlement was in the making to end Afghanistan’s war and pave the way for ‘intra-Afghan dialogue’ and a ‘nationwide ceasefire’. “Those would be possible if Afghans grasp this opportunity for peace and sit together to resolve the problems,” he said.

A joint statement was also issued with the United States committing to reduce the number of US military forces in Afghanistan to 8,600 and withdraw its troops within a timeline of 14 months. The United States and its NATO allies will also continue to fund training, equipping, advising and sustaining of Afghan security forces, to enable Afghanistan independently defend itself against internal and external threats.

Regarding a withdrawal of American troops, Esper said a drawdown will be conditions-based and that “the Taliban should hold their end of the bargain and continue reducing violence.

“NATO will reduce its presence in Afghanistan, but will continue to monitor progress here,” said NATO Chief Jens Stoltenberg, “This happens when Afghan forces no longer need our support and can manage the counter-insurgency fight.”

“Afghanistan is a different country that it was in 2001. It is no longer a safe haven for terrorists,” he said, touting the progress made over past 18 years in Afghanistan. “The challenge is to preserve these gains”.

“Peace will be sustainable if Afghan people are protected,” he said, reaffirming the NATO alliance’s commitment to protect Afghans. “We will continue funding Afghan national security forces to ensure security and stability here,” he said.

Afghan government will also engage in direct dialogue with the Taliban and discuss release of Taliban prisoners.

In the ceremony, President Ghani also talked and hinted at a temporary ceasefire across Afghanistan in 2018 when the Taliban flocked the cities and people greeted them with much euphoria.

“We have the political will and the capacity to make peace because of the resilience of our society, the dynamism of our economy and the capacity of our state, he said. Ghani said the Taliban should abandon their ties with Pakistan and other terrorist groups and stay committed to ending the fighting.

This is as the U.S. and Taliban leaders signed a peace deal on Saturday in Doha, after the success of a week-long pause in fighting that started last week on Saturday. The U.S. President Donald Trump had earlier floated plan to sign a peace deal with the Taliban and withdraw a significant portion of American troops.