Lawmakers from the House and Senate are working on provisions in the military budget bill that would take the most experienced and successful antiterrorism agencies — the F.B.I. and federal prosecutors — out of the business of interrogating, charging and trying most terrorism cases, and turn the job over to the military.

These new rules would harm the justice system and national security. They would hinder intelligence-gathering, make it harder to track down terrorists and make other countries less likely to cooperate.

Those are not our conclusions, although we strongly agree. They are the views of James Clapper, the director of national intelligence; Robert Mueller III, the director of the Federal Bureau of Investigation; and Lisa Monaco, the assistant attorney general for national security. The defense secretary, Leon Panetta, who used to run the intelligence services, has said that the military doesn’t want this responsibility. Lawmakers are ignoring them.

At issue are a series of amendments added by the House and the Senate to the National Defense Authorization Act, the annual military budget bill. They mandate military detention for most terrorism suspects (although they focus especially on Muslims). The House version would bar trying these prisoners in federal court, while the Senate version would make that very unlikely.