KEY POINTS:
Languishing in Guantanamo are 270 people convicted of no crime, and the British Parliament has just voted to extend detention without trial to 42 days.
In both the United States and Britain, governments that attack civil liberties in the name of security still rule. But in the past week the tide has turned in both countries.
In the United States, the Supreme Court has ruled for the third time in four years that the people detained in Guantanamo can challenge their imprisonment in US civilian courts. When the court made the same ruling in 2004 and 2006, an obedient Congress passed legislation overruling it, but that will not happen this time.
The Supreme Court judges have ruled once again that the ancient rule of habeas corpus, the right of every prisoner to be brought before a court where the state must give a legal justification for his detention, cannot be thrust aside on the pretext that the suspect is a foreigner, or a terrorist, or an "illegal combatant".
With Democratic majorities almost certain in both houses of Congress after the November elections, and both presidential candidates committed to shutting Guantanamo, this time the Supreme Court's ruling will stick. As Justice Anthony Kennedy put it, "The laws and constitution are designed to survive, and remain in force, in extraordinary times. Liberty and security can be reconciled; and in our system they are reconciled within the framework of the law."
The rule of law is returning in the United States after years of abuse. In Britain, it is still under attack, but the fight-back has started in earnest. After Prime Minister Gordon Brown forced through the 42-day detention law last week despite the resistance of both major opposition parties and 36 rebels from his own Labour Party, something unprecedented happened.
David Davis, the Conservative MP and shadow home secretary, resigned his seat the following day. He declared that he would run for re-election on a platform of opposition to the "monstrosity" of 42-day detention and to the "Government's slow strangulation of fundamental British freedoms".
The Great British Public, it must be admitted, is not very interested in fundamental British freedoms. As Gordon Brown pointed out, a majority of the public supports 42-day detention.
Indeed, a majority of the British public, given the right lead by the gutter press, would probably also support 90-day detention, waterboarding of suspects, 180-day detention, torture of their relatives, 360-day detention, and summary execution of detainees. Provided they were Muslim, of course.
But democratic countries have laws and constitutions precisely to fend off this kind of ignorant populism. David Davis is acting in defence of habeas corpus, and when the voters of his constituency are forced to confront the issue of human rights squarely they will probably vindicate him. So what possessed Gordon Brown to lengthen the pre-charge detention period?
Political expediency, of course. Brown's unchallenged succession to Blair as Prime Minister is already seen as Labour's great mistake, and it is almost universally assumed that the Conservatives will win the next election in less than two years' time. So Brown cast around for some symbolic gesture that would wrong-foot the Tories, and came up with 42 days - to paint himself as tough on security, and force the Conservatives to choose between defending unpopular civil liberties or playing me-too.
Stupid. The Conservatives decided to oppose the legislation, although with some misgivings, and about 50 Labour MPs were initially prepared to vote against their own Government, although various pressures reduced that to 36 for the final vote.
The law squeaked through by a majority of only nine votes. It will almost certainly die in the House of Lords (as Brown knew all along - it was only done to make him look "tough on terror").
In both of the countries where civil liberties were most grievously damaged by the "war on terror," the tide is turning. About time, too.
Gwynne Dyer is a London-based independent journalist whose articles are published in 45 countries.