DOHA/KABUL (Reuters) - American and Taliban officials looking to end a 17-year war in Afghanistan began their most detailed and high-level discussions yet on foreign troop withdrawals and counter-terrorism on Tuesday, officials close to the peace negotiations said.

The talks, which kicked off in Doha on Monday with a meet-and-greet lunch, are seen as the most promising yet between the warring parties after the Taliban’s newly-appointed political chief Mullah Abdul Ghani Baradar joined for the first time, flying in from Pakistan.

The two sides are looking to hammer out a timeline and logistics for a potential troop withdrawal, as well as guarantees that the Taliban will not host militant groups as the U.S. winds down its presence, sources close to the talks said.

“The Taliban knows foreign forces are committed to withdrawal, but we have the responsibility to ensure that Afghanistan does not get used as a base to launch terror attacks on foreign nations,” one of the officials said.

Some 14,000 U.S. troops are based in Afghanistan as part of a U.S.-led NATO mission to train, assist and advise Afghan forces. Some U.S. forces also carry out counter-terrorism operations.

U.S. military officials have been brought in to join this week’s talks in Doha, a second official said, raising hopes for progress after the last round in January secured a broad framework agreement but few details on critical aspects of a ceasefire and withdrawal.

“We have all the right people in the room on both sides,” the second official said.

U.S. President Donald Trump told Congress this month he intended to reduce U.S. forces from Afghanistan as negotiators make progress in talks with Taliban insurgents, saying: “Great nations do not fight endless wars.”

The U.S. team, led by special envoy Zalmay Khalilzad, is also pushing for the Taliban to meet with the Afghan government, which the group has so far snubbed, and to agree a ceasefire ahead of its annual spring offensive, sources said.

The hardline Islamist movement considers the Afghan government a puppet regime of the U.S. and has refused direct talks.

GOVERNMENT FEARS

Supporters of the Afghan government worry that Washington could negotiate an abrupt pullout in their absence, leaving communities that opposed the Taliban in danger and imperiling reforms such as the education of girls which the Taliban banned.

Qatar, which has hosted a political office for the Taliban since 2013, has looked to present itself as a critical staging ground and mediator for the talks.

The first meeting on Monday between Khalilzad and Baradar appeared to be “formal, and yet very cordial,” a third source close to the talks said. The two agreed to have “a result-oriented discussion” for the next five days, the source said.

Hopes have been high for a breakthrough ever since Baradar, a co-founder of the Taliban and the movement’s new political chief, was freed from a Pakistani jail last year to participate.

His appointment was widely seen as a fresh effort by the Taliban to emerge from the political and diplomatic shadows.

“Baradar gave the opening address, met with all the U.S. and Qatari officials. He requested his delegation to continue talks. He will be in Qatar, but may not attend all the sessions,” the first official said.

The United States intervened in Afghanistan in 2001 to help opposition forces topple the Taliban government which had sheltered the al Qaeda militants responsible for the Sept. 11 attacks. Washington and its allies later sent troops to prevent the Taliban from returning in a war that escalated for a decade.

Foreign intervention peaked in 2010 with 130,000 troops including 100,000 Americans but has been scaled back sharply since 2014, with Afghan forces assuming nearly all of the combat responsibility. More than 2,300 Americans have died in Afghanistan and more than 1,100 troops from more than two dozen allied countries, including more than 450 British soldiers.

The United Nations has documented the deaths of tens of thousands of Afghan civilians, most from insurgent attacks. Tens of thousands of members of the Afghan security forces and an unknown number of militants have also died.