KABUL - The government of Afghanistan on Wednesday gave its blessing to talks between Taliban insurgents and the United States and to the opening of an office for the Islamists in Qatar.

The hardline Taliban announced on Tuesday that they had come to an “initial agreement with relevant sides including Qatar” to set up their first representative office outside Afghanistan.

The move is seen as a precursor to talks to end the bloody war between the Taliban and the US-backed government of President Hamid Karzai.

“Afghanistan, to save the country from war, conspiracies, the killing of innocent people and to reach peace, agrees with the negotiations between US and Taliban that will end up in creating an office for Taliban in Qatar,” the government said in a statement. The statement said the government “considers negotiations the only way to reach peace and end the war and violence that have been imposed on our people”.

It added that the acceptance of the Taliban-US negotiations aimed to “save our country and people from foreigners’ pretexts and servants who are used to continue war in Afghanistan”.

Analysts hailed the move to open an office abroad as a step back from the Taliban’s previous refusal to negotiate until all foreign troops have left Afghan soil. “I think this is positive news for peace in Afghanistan,” Giran Hiwad, of the Kabul-based think-tank, Afghanistan Analysts Network, told AFP.

“Until yesterday the Taliban were not even talking about talks. But now they say they are prepared to open an office in Qatar.”

Haroun Mir of Afghanistan’s Centre for Research and Policy Studies said the opening of an office would be “good news for peace” but a setback for Karzai as the Taliban pursued direct talks with Washington.

“This shows that the Taliban are ready for talks, this shows that they are under pressure and now they want to negotiate,” Mir said. But the Taliban, who were ousted from power by a US-led invasion after the 2001 attacks on New York and Washington, wanted “to negotiate directly with the US in order to bypass the government in Kabul,” he said. “And finally they were able to convince the US and certainly it’s a big achievement for the Taliban and a setback for the government in Kabul.” The Karzai government, which had sought to drive any peace process itself within the country, had been outmanoeuvred by the Taliban, Mir said. Karzai has said previously that if Washington wants to set up a Taliban address in Qatar to enable peace talks he will not stand in the way, as long as those talks are led by his administration.