KABUL, Afghanistan — The highest-level negotiations yet between American diplomats and the Taliban began in Qatar’s capital on Monday, with the presence of the Afghan insurgents’ deputy leader raising hope of progress toward ending the long conflict that is taking lives in record numbers.

The latest round of talks to take place in Doha since President Trump ordered direct negotiations with the Taliban last summer will focus on fleshing out the details of a framework agreement in principle both sides say they reached last month, Western and Taliban officials said.

At issue are a Taliban agreement to keep Afghan territory from being a haven for terrorists wanting to attack the United States and its allies, and the United States in return agreeing to pull its troops out of Afghanistan.

After last month’s talks, American officials said that any withdrawal deal must include the Taliban’s agreeing to a cease-fire and to joining negotiations with the Afghan government. The Taliban negotiators, the American officials said, did not have the authority to discuss a cease-fire or negotiations with the Afghans and asked for time to return to their leadership.