The five Afghan detainees who were released from the Guantanamo Bay prison in Cuba Saturday could resume their previous roles as Taliban commanders, according to a terrorism expert.

"Looking at the profiles of these individuals, I think there’s a valid reason for concern about what lies in the near future,” said terrorism analyst Evan Kohlmann.

The men were flown off to Qatar in a C-17 aircraft Saturday as part of a controversial deal with the Taliban to secure the release of U.S. Army Sgt. Bowe Bergdahl.

The swap — mediated by the Qatari government — comes after Bergdahl was captured while serving in Afghanistan in 2009.

The five high-risk detainees transferred are in the custody of Qatari authorities and "will be subject to restrictions on their movement and activities," a senior U.S. administration official said. The five are under a travel ban for a year.

"These guys, they weren’t just picked out of a hat. The Taliban had been calling for their release."

The official said there were "no direct" talks between the U.S. and the Taliban, when asked whether the United States was breaking its policy of not negotiating with terrorists. Instead, Qatari officials acted as the middlemen during the negotiations, the official said.

"We will not transfer any detainee from Gitmo unless the threat that the detainee may pose to the United States or U.S. persons or interests will be sufficiently mitigated," the official said.

He added that the U.S. "worked closely" with Qatar to ensure the transfer "protects our national security and is consistent with our humane treatment policies."

But Kohlmann said the U.S. has a valid reason for concern if the five commanders return to Afghanistan.

“If these guys go back to the region that they’re from, I don’t have much to doubt they’re going to resume the positions that they occupied previously," he said.

The Afghan Taliban are still led by Taliban Chief Mullah Omar, a man with whom several of the detainees had a direct connection. The leadership that was in place before the men were captured, is mostly still in charge, Kohlmann said.

"These guys, they weren’t just picked out of a hat," he added. "The Taliban had been calling for their release."

According to a defense official, these are the five prisoners released:

Mohammad Fazl: Transferred to Guantanamo in 2002, he was the Taliban deputy minister of defense and served as the Taliban Army chief. According to Human Rights Watch, he could be prosecuted for possible war crimes, including mass killings.

Mullah Norullah Noori of Afghanistan. MCT / Department of Defense/Wikileaks/MCT via Getty Images

Mullah Norullah Noori: A senior commander, he was the Taliban governor of Balkh and Laghman provinces. He was a high-ranking Taliban official in the northern city of Mazar-e-Sharif when the Taliban fought U.S. forces in late 2001. He was transferred to Guantanamo in 2002.

Mohammed Nabi: A senior Taliban official, he had ties to the Haqqani network and served as chief of security for the Taliban in Qalat, Afghanistan. He has been held at Guantanamo Bay since 2002.

Khairullah Khairkhwa of Afghanistan. Department of Defense/Wikileaks/MCT via Getty Images

Khairullah Khairkhwa: He had direct ties to Mullah Omar and Osama bin Laden and served as a Taliban official in various roles, including as governor of Herat province and military commander. He was transferred to Guantanamo in 2002.

Abdul Haq Wasiq: He served as the Taliban's deputy intelligence chief and was transferred to Guantanamo in 2002. He was also in direct communication with Mullah Omar.

Kristen Welker, Courtney Kube and Jim Miklaszewski of NBC News, and The Associated Press contributed to this report.