The approaching end of the U.S. war in Afghanistan could help President Barack Obama move toward what he has said he wanted to do since his first day in office: close the American prison at Guantanamo Bay, Cuba.

Blocked by Congress from releasing or transferring many of the remaining 164 detainees at Guantanamo and able to try only a small number of them, administration officials are examining whether the withdrawal of U.S. troops at the end of 2014 could open the door for some to challenge the legal authority of the United States to continue to imprison them.

Officials believe the war's declared end could force a reckoning over the detention of more than a dozen Afghan Taliban members captured on the battlefield, allowing them to lodge new appeals to the federal courts.