The withdrawal of U.S. troops from Afghanistan next year will mark a milestone on the path to ending the so-called “war on terror.”  But as a practical matter, what will it actually mean for U.S. counterterrorism operations beyond Afghanistan?

Part of the answer may be decided in the coming weeks, as Congress debates its annual defense authorization bill. The National Defense Authorization Act, or NDAA, covers everything from the purchase of new missile systems to the funding of pensions for retired troops.  But it also plays an important role in key policy matters like whether and how the U.S. government will be able to close the notorious detention center at Guantanamo Bay.

In October, Brigadier General Mark Martins, Chief Prosecutor for the Guantanamo military commissions, acknowledged that the drawdown of troops from Afghanistan raises the question whether the United States will still have the legal right to detain the 164 detainees left at Guantanamo. “In the words of the Supreme Court, the authority to detain — if you’re detaining based on someone being a belligerent — can unravel as hot wars end,” Martins told the Washington Post. “And I think that’s a real question.” Martins was referring to the authority under the international laws of war to detain “combatants” until the end of hostilities.

Even University of Texas law professor Robert Chesney, who’s argued that the legal framework isn’t all that important to future U.S. military operations, agrees that an ongoing armed conflict, as defined by the laws of war, provides the basis for the United States’ authority to continue detaining the current prison population at Guantanamo Bay. When the United States withdraws its troops, that basis may quickly disappear.

President Obama has made clear that, 12 years and more than a trillion dollars later, it’s time to start thinking about how this war is going to end: “We must define the nature and scope of this struggle, or else it will define us.”

Closing the Guantanamo Bay prison is critical to defining the ongoing struggle against terrorism as one that Americans can fight with their heads held high. It’s now up to Congress to help the president move in that direction. Most importantly, as it negotiates a new NDAA, Congress should lift the restrictions now in place that complicate efforts to transfer even detainees repeatedly approved to leave the prison years ago.

Current restrictions also prevent the transfer of any Guantanamo detainees to the United States – even for trial. That’s kept the massive, costly complex in Cuba open to house just 164 prisoners who could be housed just as securely in existing federal prisons on U.S. soil.  It’s also led to the absurd spectacle many of us have been witnessing in the US military commissions at Guantanamo.  To handle just two active cases, the government has been flying a judge, large teams of lawyers, witnesses, experts, observers and media to the US Navy base and back to observe a handful of pre-trial hearings that move the cases along at a snail’s pace.  The five men accused of the 9/11 attacks 12 years ago are still nowhere near even getting a trial date due to the enormous challenges of trying the nation’s most complex international terrorism case ever in an inexperienced makeshift justice system at Guantanamo.

Meanwhile, the prison — still notorious as a site of torture and cruel, inhuman and degrading treatment in its earlier years — “has become a symbol around the world for an America that flouts the rule of law,” President Obama said at the National Defense University in May. It’s also undermining U.S. counterterrorism efforts: “Our allies won’t cooperate with us if they think a terrorist will end up at GTMO,” Obama acknowledged.

He also noted the astronomical costs of being the prison facility open.  According to the Pentagon, it costs about $2.7 million per year to imprison each of the 164 detainees at Guantanamo. Imprisoning an inmate in a high-security federal prison facility on U.S. soil costs about $35,000 per year.

Now is the time for Congress to take concrete steps toward ending this mess. While the Obama administration already has the authority to transfer many of the men imprisoned at Guantanamo, these provisions would make important improvements to existing law. The proposed Guantanamo provisions in the Senate NDAA clarify the authority to transfer detainees to foreign countries and replace a cumbersome certification and waiver regime with a more sensible, factor-based standard designed to mitigate any risks of transfer. With these provisions in place, the executive branch can finally follow through on the long-pending transfer orders of the 84 men already cleared.

The Guantanamo provisions in the Senate NDAA would also finally allow some detainees to be transferred to the United States — including for criminal prosecution in experienced federal courts. That’s a far more efficient, functional and less costly venue than the military commissions.

Encumbering the transfer of detainees has actually undermined U.S. national security by keeping open a prison that national security leaders on both sides of the aisle agree has become a powerful propoganda tool for terrorists and should be closed. Former President George W. Bush; former Secretaries of State Hillary Clinton, Condoleezza Rice, and Colin Powell; former Secretaries of Defense Robert Gates and Leon Panetta; former National Security Advisor James Jones; General Charles C. Krulak (ret.), former Commandant of the Marine Corps; General Joseph P. Hoar (ret.), former CENTCOM commander; former Chairman of the Joint Chiefs of Staff, Admiral Mike Mullen; and Brigadier General Michael Lehnert (ret.), who set up the Guantanamo prison, have all supported closing it.

The planned drawdown of troops from Afghanistan in 2014 make kicking the can down the road another year no longer an option. Congress needs to set politics aside and do the right thing for U.S. national security: it needs to work with the president to close Guantanamo once and for all. Passing the Guantanamo provisions in the Senate version of this year’s National Defense Authorization Act is an important step toward making that happen.