Tom Malinowski, Washington director

A Congress that cannot agree on many things that Americans want came together last week to approve something virtually no one was demanding: It decided to give the United States military the authority to arrest and imprison suspected terrorists, potentially even on U.S. soil, and to allow the government the permanent power to detain without trial people suspected of involvement in terrorism. President Barack Obama had threatened to veto the legislation, but now says he will sign it.There are "waivers" in the bill that will allow him -- and future presidents, should they agree with him -- to evade its strictures. But the Congress has nonetheless made the militarization of law enforcement against terrorism the rule in America going forward. Civilian justice is to be the exception -- employed only on those occasions when the president of the United States personally waives the rule.

The strange thing is that Congress is trying to disempower America's institutions of law and order and justice not in the wake of a fear-inducing terrorist attack, or in the face of a threat that is growing in strength. It has done so 10 years after 9/11, after the death of Osama bin Laden, and despite growing evidence that al Qaeda's leadership in Pakistan has been decimated. It has done so even though America's civilian law enforcement institutions have demonstrated time and again their resilience and adaptability to the threat posed by al Qaeda, successfully preventing countless attacks on the U.S. homeland and putting away hundreds of dangerous terrorists, swiftly, surely, and legitimately.

Congress has taken this extraordinary step even though the United States has a long tradition of keeping the military out of domestic affairs, recognizing that young Americans do not join the armed forces so that they can arrest and detain (and risk shooting at) their fellow citizens. It has done so even though no one in the U.S. military asked for this role, and every U.S. government agency engaged in the fight against al Qaeda and the protection of the U.S. homeland urged it not to.

In thinking about this, I remembered an experience I recently had in a country that is facing much more dire circumstances than the United States. Earlier this year in Libya, rebels rose up against Muammar al-Qaddafi's dictatorship, and found themselves in control of large parts of their country. They were taking prisoners -- officials of the Qaddafi regime, enemy fighters, ordinary criminals -- and had good reason to want to detain them at least for a while. But the courts in their part of Libya had closed. Few prosecutors were working. The police had disappeared.  People were being detained, by militia groups, with no due process at all, outside the authority of any law (and sadly that remains largely true today).

So this spring, a number of foreign experts asked the governing council of Libya's rebel movement whether they might enact a law that would allow them to detain suspects without trial, but with basic process, judicial oversight, and clarity about who could be arrested, just until regular courts could start working again. No one was comfortable raising this. Those urging the idea knew they were proposing basically the same thing that they did not want to see adopted by the United States or any other country with an established legal system. But international law does allow for such arrangements during declared states of emergency, to better protect detainees, and this was a real emergency. Unlike the United States, Libya had few functioning institutions. And it was in the middle of an all-out war.

What did the Libyans say? These men, who grew up in a country with no rule of law, who have often been dismissed as coming from a backward, tribal society, said "No, we will not adopt an indefinite detention law." One official told me: "That's what we had for 42 years under Qaddafi -- special courts and procedures, giving the state extraordinary powers. They were always supposed to be temporary. And they never were." The Libyan transitional government has now proposed that the country's new constitution forbid emergency courts.

Libya's rebels have often fallen short of their commitments to human rights, and are far from establishing a proper detention system. But their leaders at least understood this one thing: that it is dangerous to legislate permanent exceptions to normal legal procedures, even to deal with what one may believe, in the heat of the moment, to be a special security threat.

How can Libyans, who have no experience of democratic government, know this, while so many of America's leaders do not? One can only hope that Americans never have to learn it the hard way -- as the Libyans did.