PESHAWAR, Pakistan — U.S. officials are meeting with former Taliban members amid intensifying efforts to wind down America's longest war, three of the militant group's commanders told NBC News.

The talks have occurred in Afghanistan, Qatar and the United Arab Emirates, according to the Taliban sources.

One negotiator said Taliban delegations had been joined by "never more than five" Americans for a series of meetings in hotel suites in Doha, Qatar.

The Taliban government sheltered al Qaeda leader Osama bin Laden in Afghanistan. Its fighters have been battling American-led NATO forces to restore their version of strict Islamic law in the country since the U.S. invaded after the Sept. 11, 2001, attacks. More than 2,400 Americans have been killed during the war.

The Doha meeting participant said the gatherings were "very friendly" with "tea and cookies" being served.

The negotiator said security is "very tight in and outside," with hotel staff not allowed to enter.

Amid concerns about their own safety, the Taliban delegates are taking steps to not be identified by the intelligence services of Russia, China and Arab countries.

"We don’t go to the hotel together," the negotiator told NBC News. "We never go to the meeting place first. Once they [the Americans] reach the meeting place, then we go there one by one. We use the elevator for some of the floors and then take the stairs out of security considerations."

The source said hotels were chosen because the Taliban and U.S. officials initially "didn't trust each other."

A security guard stands outside the Afghan Taliban Political Office — the militant group's de facto embassy — after it opened in Doha, Qatar, on June 13, 2013. EPA file

NBC News could not confirm the accounts by the Taliban officials, who all spoke on the condition of anonymity because they were not authorized to speak to the media.

As interlocutors and negotiators, the Taliban count on a network of former commanders and political leaders — some of whom have previously been imprisoned by the U.S. or Afghanistan and no longer have active roles. They now live throughout the region and work in fields such as the international honey market and the carpet trade.

The Taliban, which has expanded its presence in Afghanistan and runs shadow governments in parts of the country, officially denies it is talking to the Americans or the government of President Ashraf Ghani in Kabul.

A State Department spokesperson did not confirm that any meetings had taken place, but did say the Trump administration was eager to resolve the conflict.

"The United States is exploring all avenues to advance a peace process in close consultation with the Afghan government," the spokesperson said in a statement.

U.S. troops arrive at the site of a Taliban suicide car bombing in Kabul, Afghanistan, in March 2017. Wakil Koshar / AFP/Getty Images file

They added that "negotiations over the political future of Afghanistan will be between the Taliban and Afghan government" — a reiteration of official U.S. policy of encouraging Kabul to take the lead on talks.

A spokesperson for the Department of Defense echoed the State Department's comments, saying it remained "prepared to support and facilitate an Afghan-led, Afghan-owned peace process."

"The U.S. military conducts military operations and is in an advisory capacity, not a diplomatic capacity," they added, referring questions about any negotiations to the State Department.

A Taliban commander said in an interview from Afghanistan that another gathering happened earlier this month in the United Arab Emirates.

"Americans are meeting with our former members in the UAE and Kabul," he said. "Those former Taliban then convey to us their messages from the talks with multiple options."

U.S. officials were taking an "unprecedented" interest in the peace process in recent months, the commander added.

President Donald Trump has expressed interest in withdrawing the approximately 14,000 American troops who remain in Afghanistan, a promise he made on the campaign trail.

On Monday, the top U.S. commander in Afghanistan, Gen. John Nicholson, told Reuters that the U.S. was ready to join direct negotiations with the Taliban.

Secretary of State Mike Pompeo has said that the United States was ready "to talk to the Taliban and discuss the role of international forces,” Nicholson told Reuters. “We hope that they realize this and that this will help to move the peace process forward.”

But on Tuesday, NATO's mission in Afghanistan rejected reports that the general had said the U.S. would join direct talks with the group, saying his comments were "mischaracterized."

"The United States is not a substitute for the Afghan people or the Afghan government," Nicholson said in a subsequent statement.

When asked for comment, Afghan presidential spokesman Haroon Chakhansuri said, "Our stance is the same as the latest statement by General Nicholson."

Last month, Pompeo said the U.S. was ready to "support, facilitate and participate" in discussions with the Taliban over the role of international forces in Afghanistan but that the peace process would be Afghan-led.

The 17-year war has taken a heavy toll. The first half of 2018 was its deadliest on record with 1,692 civilians killed, according to the United Nations. Thousands of Afghan forces have also died in the conflict.

The Taliban is widely seen to have the upper hand or at least reached a stalemate versus a weak and divided government in Kabul and foreign backers weary of war. According to an April report by the Special Inspector General for Afghanistan Reconstruction, the watchdog responsible for monitoring the U.S. government's effort to rebuild the country, the group threatens or controls more than 40 percent of the country.

However, the Taliban is also thought to be under pressure to negotiate from Pakistan — long accused of sheltering and arming the militants.

The Taliban commander in Afghanistan spelled out what has long been the group's bottom line in terms of foreign forces in the country.

"Our stance is quite clear and that's the same old one," he said. "The U.S. would need to withdraw its military forces from Afghanistan and exchange prisoners and let the Afghan people decide their issues as per their culture and traditions."

Previous efforts to end the conflict and hold talks have flourished before faltering.

A rare, short-lived cease-fire last month between the Afghan government and Taliban ended in an attack that killed 30 people and put the group under pressure to enter into talks.

The Taliban established an office in Doha staffed with its officials in 2013.

The following year, the group exchanged American Sgt. Bowe Bergdahl, who walked off his base in Afghanistan and was then kidnapped, for five formerly high-ranking Taliban members in U.S. custody.

Mushtaq Yusufzai reported from Peshawar; Ahmed Mengli from Kabul; Abigail Williams, Mosheh Gains and Hans Nichols from Washington; and F. Brinley Bruton and Linda Givetash from London.