President gives military wider berth on detentions, restoring civil war-era powers; Tuesday declared a day of mourning