The ruling is a setback for the administration after Trump approved Hasan’s execution in October, and the Justice Department filed an appeal.