LAST YEAR President Obama decried a series of congressional provisions that would have tied his hands in dealing with terrorism suspects. Last week he went a long way toward undoing those knots.

The mandates, as drafted in a must-pass defense bill, would have barred civilian court trials for terrorism suspects. The administration would have been virtually unable to repatriate or transfer detainees at the U.S. naval base at Guantanamo Bay, Cuba, to third countries. Terrorism suspects captured on U.S. soil would have to be held in military custody.

These measures would have undermined the role of the FBI and other law enforcement agencies in combating terrorism inside the country. Mr. Obama signed the legislation, but only after threatening a veto and persuading Congress to give him the flexibility to ensure that all tools, including traditional law enforcement powers, would be available.

Last week Mr. Obama took full advantage of that flexibility. The White House issued guidelines that rightly maintain military detention as an option without undercutting law enforcement agencies. According to the guidelines, U.S. citizens and permanent legal residents may not be subject to military detention; citizens and green-card holders who are suspected of terrorism activity must be processed through the federal criminal system.

A foreign national suspected of terrorism activity and captured on U.S. soil by federal law enforcement officers may be transferred to military custody, but only if the attorney general, defense secretary, director of national intelligence and other top national security officials agree that there is probable cause to believe the suspect is a member of or has close links to al-Qaeda or an associated force. The national security team must also determine that the individual was involved in carrying out, orchestrating or planning an attack. While national security officials assess the case, the guidelines make clear, federal law enforcement activities, including interrogation of the suspect, should continue. The president’s directives also clarify that a suspect who is transferred to military custody may be returned to the civilian system to face federal charges.

The Obama administration has at times been myopic in its approach to combating domestic terrorism, reflexively favoring a law enforcement approach. Its handling of “underwear bomber” Umar Farouk Abdulmutallab, who was shuttled through the federal court system after attempting to blow up a plane on Christmas Day 2009, was such an instance. Congressional critics seized on this episode but went too far in demanding that future suspects be held in military custody. Mr. Obama’s directives last week rightly preserve presidential prerogatives to use any and all tools to deal with a threat against the homeland.