DOHA, Qatar — The Taliban signaled a willingness to meet demands to keep their flag lowered as the United States warned Saturday that their newly opened political office in Qatar might have to be closed as talks aimed at ending nearly 12 years of war in Afghanistan remained in limbo.
Secretary of State John Kerry said the next move was up to the Islamic militant movement, urging the Taliban to step back from the brink and begin what he called the difficult road ahead. He said the main US envoy for Afghanistan and Pakistan was in Doha and ‘‘waiting to find out whether the Taliban will respond.’’
The Taliban’s office opened Tuesday to much fanfare and an announcement that US officials would begin formal talks with Taliban representatives, which eventually would be joined by the Afghan government, raising hopes the long-stalled peace process aimed at ending the war could finally begin.
But it ran into trouble from the outset when Afghan President Hamid Karzai temporarily withdrew from talks to protest the Taliban’s use of its old flag and a sign bearing the name of the Islamic Emirate of Afghanistan, which the movement used during its five-year rule that ended in 2001 with the US-led invasion.
After intervention from the Qatar government, the flag was lowered and the sign changed to the ‘‘Political Bureau of the Taliban Afghan in Doha.’’ Both the United States and the Qataris said the Taliban had agreed on the preapproved name but violated the pact at the ribbon cutting ceremony.
A Taliban spokesman in Doha, Shaheen Suhail, suggested the Taliban were willing to move forward despite ‘‘much anger’’ among some members over the removal of the name and the lowering of the Taliban flag — a white flag emblazoned with a Koran verse in black.
‘‘In the past 12 years, the opening of the political office is the first ray in the direction of peace in Afghanistan,’’ Suhail said.
‘‘Those who want real peace in the county should support this move. These are the first days. There should not be high expectations to see everything resolved in one day, nor should there be disappointments.’’
He said the United States had not contacted the Taliban yet to discuss a meeting.
James Dobbins, US special envoy to Afghanistan and Pakistan, arrived in Doha on Saturday.
Kerry, in the Qatari capital for separate talks on Syria’s civil war, said the Americans and the Afghan government’s High Peace Council were ready, and he encouraged the Taliban to remain in the process.
‘‘Nothing comes easily in this endeavor, we understand that. The road ahead will be difficult, no question about it, if there is a road ahead,’’ he said at a press conference, adding ‘‘it’s really up to the Taliban to make that choice.’’
‘‘It remains to be seen in this very first test whether or not the Taliban are prepared to do their part,’’ he said.
Suhail for the first time suggested the Taliban were willing to discuss a cease-fire, as well as the presence of US troops in Afghanistan to train Afghan security forces after the end of the NATO combat mission in 2014. He even agreed to the rights of women being on the table, a nod to fears among women, mostly in Afghanistan’s cities, that the Taliban would reinstate restrictive rules such as the mandatory wearing of the all-encompassing burqa.
While most women in Afghanistan still wear the burqa, it was law during the Taliban rule. They also did not allow girls to attend school, which they have also backed away from.
‘‘Yes there should be a cease-fire but first you have to talk about how to reach a cease-fire. How can it be done in one day?’’ he asked. ‘‘It can be part of the agenda and discussed, also foreign troops in Afghanistan can be part of the agenda, the general concern of the Afghan people, of the Afghan women can all be part of the agenda. It is only when this process goes forward can we make progress.’’
The Taliban earlier said they have agreed to free US Army Sergeant Bowe Bergdahl — a 27-year-old Hailey, Idaho, native who was captured four years ago in Afghanistan — in exchange for five Taliban prisoners being held in the US prison in Guantanamo Bay, Cuba.
In Kabul, a member of the government’s negotiation team said it was still prepared to begin talks in Qatar and called the removal of the sign and flag was a positive sign.
High Peace Council member Shahzada Shahid said it was too early to say when members of the council would travel to Qatar for talks. ‘‘Peace is very important and vital for us so we will take all measures for it,’’ he said.
Meanwhile on the battlefield, 18 Taliban militants were killed Saturday when they attacked a local security post in northern Afghanistan, sparking fighting that also left two Afghan policemen dead, Afghan officials said.
A militant attack also killed a coalition service member in the south on Saturday, NATO said. The statement did not provide a nationality or further details.