A Taliban militant speaks to U.S. Army Sergeant Bergdahl waiting in a pick-up truck before his release at the Afghan border Reuters

The story of Bowe Bergdahl, the American prisoner of war freed in a White House-brokered exchange for five Taliban leaders, has drawn intense attention in the United States, where the media have focused on the circumstances of Bergdahl’s capture.

But the fate of the five men released from the U.S. military detention center in Guantanamo Bay, Cuba, may ultimately determine the success of President Barack Obama’s prisoner swap.

At the moment, the five -- Abdul Haq Wasiq, Mullah Norullah Noori, Mullah Mohammad Fazl, Mullah Khairullah Khairkhwa, and Mohammed Nabi -- are in Qatar, the tiny Persian Gulf emirate in which the Taliban established a political office in 2012. Under the terms of the agreement, the freed prisoners will remain in Qatar for one year, where they will be free to move about the country. After one year, the men will be allowed to leave Qatar and “can go back to Afghanistan if they want to,” a senior Gulf official told Reuters.

Legislators in the United States, as well as the Afghan government, have expressed concern that the freed detainees will provide a major boost to the Taliban’s effort to re-establish control in Afghanistan. Each of the five men held important positions in the movement prior to their capture, and news of their release reportedly triggered a jubilant response among Taliban fighters in Afghanistan.

Should the prisoners return to Afghanistan and rejoin the Taliban insurgency, they risk being captured again, by the Afghan government as well as the remaining Western military contingents in the country. However, this occurrence is hardly assured: Obama plans to withdraw the last American combat troops from Afghanistan this year and all forces by the end of 2016, and the government in Kabul has struggled to maintain control of the country.

Even if the men remain in Qatar beyond next year, they may still be able to rejoin the Taliban. Since establishing its political office in the emirate two years ago, the Taliban has sought recognition as a legitimate opposition movement to the Afghan regime in Kabul. Officials in Qatar -- not in Afghanistan or Pakistan, where most high-ranking Taliban are thought to live -- brokered the agreement with the United States, and Taliban in Qatar appear to have little difficulty conducting operations remotely. Referring to the freed detainees, a senior Taliban official told the Daily Beast, “Officially their bodies would be in Qatar, but thoughts and wisdom of jihad would be with us.”

For Obama, this is a risk he was willing to take.