This week, the Senate takes up a White House-backed defense authorization bill that would reduce the restrictions on repatriating Yemeni nationals held in the Guantanamo Bay detention facility. These changes are long overdue. Many of these detainees are eligible for transfer, which would be a significant step in closing Gitmo.

However, to minimize the significant risk of them joining Al Qaeda in the Arabian Peninsula, or AQAP, and engaging in terrorism, the U.S. should first establish a rehabilitation center for them in Yemen, based on a Saudi Arabia model, with a rigorous post-release monitoring program. Other alternatives, including continued indefinite detention, repatriation without a rehabilitation program or resettlement in third countries, carry higher diplomatic and security risks.

Hundreds of Gitmo detainees have been transferred or released since 2002, but it has not been without cost. More than 25% were later confirmed or suspected of engaging in terrorist activities. There are 164 detainees at Gitmo, including 30 Yemenis in conditional detention. These individuals are not facing prosecution, but they cannot be transferred until the security situation in Yemen improves, or third-country resettlement options are found, or an appropriate rehabilitation program becomes available. These detainees are not, as some politicians describe them, "the worst of the worst." They are not high-value detainees, nor is there a basis to hold them as enemy combatants.

Any former Gitmo detainee who later engages in terrorist activity poses a significant risk to the United States. This risk is particularly acute in Yemen, the home of AQAP, Al Qaeda's most active affiliate. While using former detainees as terrorist operatives is possible, AQAP would most likely exploit their "rock star" status for propaganda purposes to further the Al Qaeda narrative.

The best option is to establish a Yemeni rehabilitation program modeled on the Prince Muhammad bin Nayif Center for Counseling and Care, which was established to rehabilitate extremists paroled from Saudi prisons. Since 2006, more than 3,000 parolees have been processed through the center, including 120 former Gitmo detainees. The center acts like a traditional halfway house and combines de-radicalization (changing of thinking) and demobilization (consciously choosing to abandon violence as a means to political ends) by reintegrating detainees into their families, the economy and society.

It also applies significant legal, social and security pressure to discourage reengagement, such as encouraging beneficiaries to publicly renounce Al Qaeda. Post-release, Saudi security services monitor the parolees while the center provides financial support, counseling and other help. Those who fail to meet the terms of their parole are returned to the center or incarcerated.

While it is impossible to determine if the participants in this program become truly de-radicalized or simply demobilized, Saudi Arabia claims a recidivism-to-terrorism rate of 2% to 3%. This compares favorably with a 70% recidivism rate there for drug offenders and 45% for general crimes.

The Saudis concede that the former Gitmo detainees have had a higher recidivism rate than the non-Gitmo beneficiaries. Still, a combination of deradicalization, demobilization and post-release monitoring remains the most promising option to reduce this recidivism risk.

If President Obama's stated foreign policy goal of closing Gitmo is to be achieved, detainees in conditional detention will have to be repatriated or otherwise transferred. Just transferring these 30 Yemenis would not solve the Gitmo issue, but it would be a significant step toward closing the facility and countering a key element of Al Qaeda's narrative. Establishing a rehabilitation center in Yemen and funding a rigorous post-release monitoring program are the best options for reducing the recidivism rate. The Saudi program costs $26 million for a three-year period. In comparison, the fly-away cost for one Reaper drone is about $16 million.

Following through on these actions would not eliminate all risks, but it is the option with the least political and security risks.

Charles E. Berger, an assistant special-agent-in-charge at the FBI, is on sabbatical at the Council on Foreign Relations as the national intelligence fellow. These views are his own.