SINCE EARLY IN his administration, President Obama has been bedeviled by lawmakers intent on frustrating his pledge to close the Guantanamo Bay detention center and determined to tie his hands when dealing with detainees. Congress decreed that no Defense Department funds could be used to transfer terrorism suspects into the United States — even those who had been ordered released by federal judges or destined for federal court prosecutions. No Defense funds could be used to build or buy a prison on U.S. soil to house detainees. Intimidated by fearmongering, even Democrats embraced these obnoxious provisions. The president essentially stood by, grousing quietly.

Congress is again moving to renew — and in some cases, ratchet up — many of these restrictions. This time — in the wake of the successful military operation that killed Osama bin Laden — the president seems willing to fight. It’s about time.

The House last week passed a defense authorization bill that contained provisions that essentially bar the president from prosecuting Guantanamo prisoners in federal court and limit his flexibility in transferring detainees to third countries. A last-minute amendment requires all foreign nationals accused of acts of terrorism — apparently even those captured in the future on U.S. soil — to be tried only in military commissions.

The president responded with what appears to be his first veto threat in connection with detainee restrictions. He is right to reject what the administration called the “dangerous and unprecedented challenge to critical executive branch authority.” He also is justified in fighting against the attempt to strip federal courts from his anti-terrorism arsenal. “Presidents of both political parties — including Presidents Ronald Reagan, George H.W. Bush, Bill Clinton, and George W. Bush — have leveraged the flexibility and strength of our Federal courts to incapacitate dangerous terrorists and gather critical intelligence,” a White House statement said.

Mr. Obama should extend his intervention in the legislation to two other provisions. House Armed Services Committee Chairman Howard “Buck” McKeon (R-Calif.) has introduced a much-needed update of the original Authorization for the Use of Military Force (AUMF). The new AUMF largely tracks the Obama administration’s own definition of terrorism suspects as those who “are part of or substantially support” al-Qaeda, the Taliban and associated forces; it authorizes the president “to use all necessary and appropriate force during the current armed conflict” against these enemies. Yet the White House argues that the new AUMF “would effectively recharacterize [the conflict’s] scope and would risk creating confusion regarding applicable standards.” If Mr. Obama is worried that the new AUMF is unwieldy, he should negotiate for specific parameters, such as a clause that would require congressional action to renew the authorization.

Mr. Obama should also engage in discussions over Mr. McKeon’s proposal to establish a permanent legal structure to govern the review process for detainees who are held without trial. Mr. Obama issued an executive order this year that establishes such a protocol — an approach that is preferable to Mr. McKeon’s in that it includes more robust protections for current detainees, including the right to legal representation. But it makes no provision — as Mr. McKeon’s proposal does — for the possibility of future captures. And it lacks the heightened legitimacy that comes from congressional endorsement.