President Trump speaks at a campaign rally Thursday night in Manchester, N.H. (Elise Amendola/AP)

U.S. negotiators have made significant advances in recent talks with the Taliban, and the two sides are close to announcing an agreement on an initial U.S. troop withdrawal, along with plans to start direct discussions between the militants and the Afghan government, according to American and foreign officials.

President Trump met Friday with Cabinet officials and other senior national security advisers for a briefing by Zalmay Khalilzad, the chief U.S. envoy to the talks. Attendees at the meeting, held at Trump’s New Jersey golf resort, included Vice President Pence, Secretary of State Mike Pompeo, Defense Secretary Mark T. Esper, Joint Chiefs of Staff Chairman Joseph F. Dunford Jr., CIA Director Gina Haspel and White House national security adviser John Bolton.

An initial withdrawal under the proposed deal would include roughly 5,000 of the 14,000 U.S. troops in Afghanistan. In exchange, the Taliban would agree to renounce al-Qaeda and to bar it from activities such as fundraising, recruiting, training and operational planning in areas under Taliban control.

A statement after the meeting offered no details, with Hogan Gidley, the principal deputy White House press secretary, saying only that “discussions centered around our ongoing negotiations and eventual peace and reconciliation agreement with the Taliban and the government of Afghanistan.”

“The meeting went very well,” Gidley said.

In an evening tweet, Trump called the meeting “very good” and wrote, “Many on the opposite side of this 19 year war, and us, are looking to make a deal - if possible!”

Earlier, a White House official cautioned that it might not immediately result in a decision or an announcement.

In addition to the withdrawal, the agreement is expected to include a statement of Taliban willingness to sit down with representatives of Afghan President Ashraf Ghani’s government to develop a political framework for peace, something that has long been a sticking point in the U.S.-Taliban talks.

Last week, as technical experts wound up the latest round of U.S.-Taliban meetings in Doha, Qatar, Khalilzad traveled to Germany, which is in charge of shepherding the inter-Afghan negotiations, and to Oslo, where those discussions are likely to be held.

Throughout the U.S.-Taliban talks, critics in Kabul and Washington have questioned U.S. willingness to bypass the Afghan government in its eagerness to meet Trump’s insistence on withdrawal.

The Taliban has not publicly expressed any change in its refusal to negotiate with Ghani. But U.S. officials have said throughout the months of negotiations that any phased withdrawal agreement would be explicitly linked to the start of inter-Afghan talks.

Once the agreement is announced, U.S. officials expect the two Afghan sides to move directly into talks. The pact is also expected to reference a cease-fire as part of the initial round of those negotiations, although it is unlikely to immediately halt the fighting, according to the officials, who spoke about the status of the closed-door negotiations on the condition of anonymity.

It is expected that the Afghan talks would develop a road map for Taliban inclusion in government and would address matters such as the role of women in Afghanistan and other social issues.

Assuming the talks continue as outlined, discussions between the Afghan sides would also consider the extent to which the U.S. military could maintain a residual counterterrorism presence in Afghanistan, something that many in the administration and Congress think is imperative.

Following the initial U.S. withdrawal, however, the bulk of American troops would leave within about 18 months. Germany and Italy, which have sizable numbers of troops in Afghanistan under NATO auspices, would expect to time their own withdrawals to the U.S. departure, officials said.

After numerous reports of military progress or imminent peace throughout the 18-year war, all sides have cautioned that hopes of announcing a deal before the end of August could fall apart or be delayed. Khalilzad, who arrived in Washington late Monday, expects to return to Doha, where his Taliban counterparts will report on their own leadership consultations.

U.S. officials are hoping that the Afghan parties, once they have agreed to meet, will jointly call for a delay in Afghanistan’s presidential election, scheduled for Sept. 28.

In public statements, Ghani — running for a new term — has rejected any delay, and last week he said the vote was “vital” to the nation. His chief challenger, former national security adviser Hanif Atmar, has dropped out of the race. Others among the 16 candidates challenging Ghani have said the election must be delayed whether or not a viable agreement is announced.

Some in Congress are also expected to object to the deal, questioning whether the Taliban, whose military position and control of territory is better than it has been since the start of the war in 2001, can be trusted to break relations with al-Qaeda. There are also concerns that dissent within Taliban ranks over any deal will prompt some fighters to join a growing Islamic State presence in Afghanistan.

Sen. Lindsey O. Graham (R-S.C.), responding to initial reports of a deal, said in a statement that “to trust the Taliban to control al-Qaeda” and other militant groups in Afghanistan “as a replacement for a U.S. counterterrorism force would be a bigger mistake than Obama’s Iranian nuclear deal.”

“I hope President Trump and his team make sound and sustainable decisions about radical Islamist threats emanating from Afghanistan — the place where 9/11 originated,” Graham said.

A White House official, speaking before the meeting, said Trump has been clear about wanting to bring U.S. troops home from Afghanistan and that remains his long-term priority.

In a tweet late Friday afternoon, the president posted a video clip from his Thursday night campaign rally in Manchester, N.H. “I’m the president of the United States of America; I’m not the president of the world,” he told the crowd. Though he was bemoaning economic globalism, Trump could easily have been talking about his long-held opposition to America’s foreign military entanglements.

Gen. Austin “Scott” Miller, the U.S. commander in Afghanistan, has long said he could conduct the mission with fewer troops. Miller wants to keep open Bagram air base, from which the United States launches strikes in Afghanistan’s eastern mountains, people familiar with his thinking said. The military is also likely to want to maintain a robust presence at Kandahar Airfield, the largest U.S. base in the southern part of the country.

Since taking over in September 2018, Miller, a former Special Operations commander, has led an intense air campaign against the Taliban.

Some critics have expressed concern that the United States could be giving away much of its leverage by announcing a troop withdrawal up front, before progress in inter-Afghan negotiations has been achieved. Khalilzad, however, may be pressing ahead to avert a unilateral withdrawal announcement by Trump, who in December made a similar surprise announcement about pulling U.S. troops out of Syria, leading then-Defense Secretary Jim Mattis to resign.

Talks between the Taliban and Khalilzad officially began in October. The U.S. envoy has outlined the discussions as including four “pillars,” or subject areas: the foreign troop withdrawal long demanded by the Taliban, assurances by the Taliban that it would take steps to ensure that no terrorist attack on the United States could again be launched from Afghanistan, a cease-fire, and inter-Afghan talks leading to a power-sharing agreement and peace.

An outline of an agreement on the first two was reached quickly. “Basically, they’ve been ready since early in the year,” said a former senior administration official familiar with the issues and the negotiations. “They’ve been trying to use them as leverage on the other issues, and that’s taken time.”

More recently, “the bar has dropped significantly on what [Khalilzad] would accept,” the former official said. Negotiators felt they were running out of time in the face of approaching Afghan elections and the ever-present fear that Trump would announce a withdrawal before a comprehensive agreement had been reached.

A number of contentious side issues also had to be dealt with. While the Taliban insisted that the country be referred to in documents as the Islamic Emirate of Afghanistan, the United States and Ghani adamantly resisted. The most likely compromise — which the Americans hope the Afghan government will accept — is a reference to Islamic Emirate as the name of the Taliban political party of the future.

In addition to talks on a residual U.S. presence, cease-fire discussions have not advanced. Ghani is said to be seeking at least a temporary stop to the fighting as part of an agreement, perhaps in exchange for the release of high-profile militants among the more than 10,000 Taliban prisoners the government is holding.

On both of those issues, remaining U.S. leverage may come down to how willing the Americans and the rest of the international community are to support Afghanistan after decades of upheaval and outright war.

The Taliban “say they don’t want to be marginalized” by most of the world “as they were last time they were in power,” the former official said. “They recognize they will need assistance from the international community to have some sort of sustainability.”

The question is “what are the types of things [the Taliban] would be willing to give,” including a continued U.S. military role in Afghanistan, “in exchange for that support.”

Josh Dawsey contributed to this report.