Representatives from the Taliban and United States officials have signed an agreement in the Qatari capital, Doha, following 18 months of talks in a bid to end Washington's longest war.

The long-awaited agreement has four points, including a timeline of 14 months for all US and NATO troops to withdraw from Afghanistan.

More:

Its points include a Taliban guarantee that Afghan soil will not be used as a launchpad that would threaten the security of US; the launch of intra-Afghan negotiations by March 10; and a permanent and comprehensive ceasefire.

Below is a round-up of international reaction to the agreement that was signed on Saturday in the presence of international dignitaries.

United Nations

United Nations Secretary-General Antonio Guterres called the agreement an important development in achieving a lasting political settlement in Afghanistan, while stressing the importance of sustaining a nationwide reduction in violence.

"The Secretary-General welcomes efforts to achieve a lasting political settlement in Afghanistan. Today's events in Doha and Kabul mark important developments in this regard," UN spokesman Stephane Dujarric said in a statement.

"The Secretary-General stresses the importance of sustaining the nationwide reduction in violence, for the benefit of all Afghans. He encourages continued efforts by all parties to create an enabling environment for the intra-Afghan negotiations and a comprehensive peace process."

Qatar

Addressing the signing ceremony, Sheikh Mohammed bin Abdulrahman Al Thani, Qatar's foreign minister, said Qatari mediation helped make the signing of the agreement possible.

"We hope this historic agreement will contribute to achieving peace, stability and prosperity in the region and the world," he said.

Saudi Arabia

In a statement, Saudi Arabia's foreign ministry said it hoped the agreement would lead to a comprehensive and permanent ceasefire and nationwide peace in Afghanistan.

Representatives from the Taliban in Doha, Qatar [Sorin Furcoi/Al Jazeera]

NATO

NATO said it welcomed the progress made and announced that the deal will lead to a reduction in the alliance's long-standing military presence in Afghanistan.

"Recent progress on peace has ushered in a reduction of violence and paved the way for intra-Afghan negotiations ... to reach a comprehensive peace agreement," NATO allies said in a statement. "We call on the Taliban to embrace this opportunity for peace."

"In this context, the alliance and its partners in the Resolute Support Mission will implement conditions-based adjustments, including a reduction to our military presence," the statement added.

NATO allies now expect the start of talks within Afghanistan leading to a lasting peace agreement that puts an end to violence, safeguards human rights, upholds the rule of law "and ensures that Afghanistan never again serves as a safe haven for terrorists".

Meanwhile, NATO Secretary-General Jens Stoltenberg heralded the agreement as a "first step to lasting peace".

"The way to peace is long and hard. We have to be prepared for setbacks, spoilers, there is no easy way to peace but this is an important first step," the Norwegian former prime minister told reporters in Kabul.

Pakistan

Pakistan's Prime Minister Imran Khan welcomed the signing of the deal, saying it is the beginning of a "reconciliation process".

"We welcome the Doha Accord signed between US & the Taliban.This is the start of a peace & reconciliation process to end decades of war & suffering of the Afghan people. I have always maintained that a pol solution, no matter how complex, is the only meaningful path to peace," Khan said in a Twitter post.

"Now, all stakeholders have to ensure that spoilers are kept at bay. My prayers for peace for the Afghan people who have suffered 4 decades of bloodshed," he said.

"Pakistan is committed to playing its role in ensuring the agreement holds & succeeds in bringing peace to Afghanistan."

Taliban

Mullah Abdul Ghani Baradar, head of the Taliban political office in Qatar, said in brief comments that the group was "committed to implementing this agreement".

"I call on all Afghans to honestly work for peace and gather around the table for peace negotiations." He added that he hoped the withdrawal of all foreign troops from Afghanistan would allow all Afghans to "have a peaceful life under Islamic law."

In a statement, the Taliban said it had reached an agreement "about the termination of occupation of Afghanistan".

"The accord about the complete withdrawal of all foreign forces from Afghanistan and never intervening in its affairs in the future is undoubtedly a great achievement," it added.

United States

In a televised speech, US President Donald Trump hailed the deal and said he would personally meet Taliban leaders "in the not too distant future".

Mike Pompeo at the signing ceremony in Doha, Qatar [Sorin Furcoi/Al Jazeera]

Speaking at a news conference in the White House, Trump said Afghanistan's neighbours should help maintain stability following the agreement.

"It's time after all these years to go and bring our people back home. We want to bring out people back home," he said. "We just signed an agreement that puts us in a position to get it done and bring it down to in the vicinity of 8,000 troops," Trump added.

"If bad things happen we'll go back ... go back with a force like nobody has ever seen," Trump said.

Speaking from the ceremony in Doha earlier, US Secretary of State Mike Pompeo called on the Taliban to honour its commitments.

"I know there will be a temptation to declare victory, but victory for Afghans will only be achieved when they can live in peace and prosper," Pompeo said.

Pompeo said he was still moved by the September 11 attacks and proud of what the US had accomplished in Afghanistan although he stressed that the US must be realistic about its options.

"I am just as angry over 9/11 as I was the day I watched al-Qaeda knock down the Twin Towers on TV," Pompeo told reporters.

"We will not squander what they and you have won through blood sweat and tears," he said.