ATTORNEY GENERAL Eric H. Holder Jr. announced on Monday that Khalid Sheik Mohammed and four others will be tried in military commissions for their alleged roles in the attacks of Sept. 11, 2001.

The decision comes nearly 10 years after the attacks that took the lives of more than 3,000 people, eight years after Mr. Mohammed’s capture and some 16 months after Mr. Holder first said the five defendants would be tried in a federal courthouse in Manhattan. The reversal is a personal blow for Mr. Holder, who has been the Obama administration’s most committed advocate for prosecuting terrorism suspects in federal courts. But it is the correct call.

The original decision to try Mr. Mohammed and the others in federal court was reasonable, given that the attacks occurred on U.S. soil and involved largely civilian casualties and targets. But Mr. Holder and the administration botched the matter by failing to consult fully with New York officials about security and cost concerns. Soon, local officials and federal lawmakers of both parties were criticizing the decision, forcing the administration to reconsider. The case has been on hold since.

In the meantime, Congress enacted provisions that essentially barred the administration from bringing into the United States detainees at the U.S. naval base at Guantanamo Bay, Cuba, including those targeted for prosecution. As Mr. Holder acknowledged, these restrictions are not likely to be lifted anytime soon. The administration’s remaining choice was not between a federal court trial and a military commission for the Sept. 11 defendants but between charging the men in the military system and holding them indefinitely without trial. Some liberal interest groups and civil liberties organizations criticized the administration for pressing ahead with a military trial, but would they prefer long-term detention without trial, an approach they also have condemned?

Although not yet tested, the rules for military commissions have been improved since 2009 and now offer many of the legal protections embedded in civilian courts. Detainees are guaranteed military lawyers at government expense and have the option of hiring civilian lawyers or relying on those who donate their services. A detainee facing a possible death sentence is entitled to two attorneys at government expense. Detainees may attend all sessions, cross-examine government witnesses and present their own. They may not be forced to testify against their will. Hearsay testimony has to be deemed reliable and relevant to be admitted. Defense lawyers with proper clearance are entitled to review classified material or a reasonable substitute or summary if the raw material is deemed too sensitive.

Mr. Holder was right during his announcement on Monday to defend the ability of federal courts to handle the vast majority of terrorism cases, including the Sept. 11 prosecutions. “I am confident that our justice system would have performed with the same distinction that has been its hallmark for over 200 years,” Mr. Holder said. He was right to criticize Congress for trampling on the executive’s exclusive authority to decide who gets prosecuted and where. But given the circumstances, he’s also right to move forward, finally, with these trials.