In Doha on Saturday, US secretary of state Mike Pompeo hailed the “historic talks” which led to the signing of an agreement with the Taliban which will see the US begin to withdraw its troops from Afghanistan after more than 18 years of war.

In Washington, however, the deal was not greeted with universal enthusiasm even by Trump allies such as Lindsey Graham or by former presidential aides, among them the former national security adviser John Bolton.

Many observers counselled caution and pointed to a difficult road ahead.

Most pointed out that the deal leaves peace in Afghanistan to be negotiated between the Taliban and an Afghan government the militants have always denounced as a puppet.

Many voiced concerns about safeguarding human rights advances, particularly concerning the lives of Afghan women, made since the US invasion in 2001 which also denied al-Qaida terrorists their base for the 9/11 attacks.

US troops could be out by spring 2021 but that will depend on the Taliban refraining from violent action. In the US on Saturday a planned prisoner exchange was also criticised as a potential concession too far.

The White House said: “President Trump promised to bring our troops home from overseas and is following through on that promise.”

Opponents of the Trump administration emphasised the timing of the deal in an election year.

In a statement, Graham, a foreign policy hawk who appeared at a Trump campaign rally in his home state on Friday, said he would “support any reasonable effort to negotiate an end to the war in Afghanistan.

“However, any peace agreement must be sustainable, honorable and include protections for the American homeland against international terrorist organisations that are alive and well in Afghanistan.”

The South Carolina Republican added: “I am very suspect of the Taliban ever accepting the Afghan constitution and honouring the rights of religious minorities and women. Time will tell if reconciliation in Afghanistan can be accomplished with honour and security, but after more than 18 years of war, it is time to try.”

John Bolton, Trump’s third national security adviser who was fired in September last year, was more damning.

“Signing this agreement with Taliban is an unacceptable risk to America’s civilian population,” he said in a tweet. “This is an Obama-style deal. Legitimising Taliban sends the wrong signal to [Islamic State] and al-Qaida terrorists, and to America’s enemies generally.”

The mention of Obama would have been particularly stinging to Trump, who has repeatedly sought to reverse his predecessor’s actions.

Bolton was also a key figure in Trump’s impeachment, over his approaches to Ukraine, which the president survived. The former adviser has a book coming out – Trump is trying to block it.

At the White House on Saturday afternoon, at a press conference to discuss the coronavirus outbreak, Trump was asked about Bolton’s comment.

“He had his chance, he didn’t do it,” he said, before seeming to refer to Bolton’s role in the administration of George W Bush, under which the US invaded Afghanistan.

“He was very much in favour of going in, we should never have gone in in the first place. When they went into Iraq, when they went into the Middle East in such a fashion I was very much against it.”

In fact, at the time Trump voiced his support for the Iraq war.

The candidates for the Democratic nomination to face Trump in November were campaigning on Saturday, mostly in South Carolina which was staging its primary.

A senior figure on Capitol Hill, the Connecticut senator Chris Murphy, said the agreement with the Taliban was “a step in the right direction”.

But, he added: “It’s critical that women and minorities are brought to the table in the coming negotiations … we must sustain our diplomatic engagement with the Afghan people as we also work to begin bringing our troops home, while leaving critical counterterrorism operations in place.

“This is the longest war in our country’s history, and that’s exactly why Congress must be consulted before any final agreement is reached. That’s why I am requesting Ambassador [Zalmay] Khalilzad” – the peace envoy who signed the deal in Doha – come before the Senate foreign relations committee in the coming weeks.”

Elliot Engel, the Democratic chair of the House foreign relations committe, said he was “concerned that this negotiation was carried out without any meaningful input from Congress and with little transparency for the American people – a recurring problem with this administration”. He also said he expected Khalilzad to appear before his committee.

Experts also advised caution.

Kate Clark, co-director of the Afghanistan Analysts Network, said: “This is not yet a peace deal, it’s a withdrawal deal. You can’t help hoping for something like a momentum being created by this reduction in violence but it didn’t happen after the Eid ceasefire [in 2018].”

Richard Haas, president of the Council on Foreign Relations thinktank, said: “As welcome as peace in Afghanistan would be, it is hard to believe it is at hand. I see no mention of Taliban disarmament or closing its Pakistan sanctuary. The risk is the US removes capabilities in the long-shot hope the Taliban will change its ways.”