Parliament might have been denied its debate and the cabinet might have been silenced, but there are other means of holding the government to account. If, by 4pm today, his lawyers have failed to agree that he will not attack Iraq without a new UN resolution, the Campaign for Nuclear Disarmament will take the prime minister to court. For the first time in history, the British government may be forced to defend the legality of its war plans in front of a judge.

The case, hatched by the comedian Mark Thomas, looks straightforward. The UK and the US are preparing to invade, whether or not they receive permission from the UN. Jack Straw, the foreign secretary, has stated that the UK will "reserve our right to take military action, if that is required, within the existing body of UN security council resolutions". But no UN resolution grants such a right.

Last week, Matrix Chambers, the legal practice founded by the prime minister's wife, prepared a legal opinion for CND. Its findings were unequivocal: "The UK would be in breach of international law if it were to use force against Iraq... without a further security council resolution."

The judge might decide that the courts don't have the authority to rule on military matters, but if she does agree to hear the case, the chances of winning are high. If CND wins, its lawyers believe it is "inconceivable" that the British government would go to war without a new resolution, as it would lose its remaining moral authority. Activists in the US are hoping to launch a similar case.

If these suits did force our governments to return to the UN, they might not prevent a war with Iraq, as the security council could grant them the resolution they want. But this would not mean that the exercise was a waste of time. If the most powerful countries are permitted to wipe their feet on the UN charter with impunity, then the world will swiftly come to be governed by unmediated brute force.

This is the factor which many of those liberals who support the invasion of Iraq have failed to grasp. If a war is to be accounted just, it must meet a number of conditions. Not only must it reduce the sum total of violence in the world, and improve the lives of the oppressed, but it must also be shown not to replace one form of oppression with another.

It is not difficult to conceive of a just war against Iraq. We know that it is governed by one of the world's most bestial regimes, and that the lives of its people would be immeasurably improved if that regime was replaced by a democratic government. If this was indeed the purpose of an attack, if less violent means of achieving the same result had been exhausted, if it was legal and if the attacker was a nation with no recent record of expansionism and foreign aggression, which had no special interest in Iraq's resources, and whose political class was not talking of creating a "new imperium", we should support it. But none of these conditions has been met.

It is plain that the US government's decision to go to war came first, its chosen target second, and its reason for attacking that country third. Everyone seems to have forgotten that the original plan, after the bombing of Afghanistan, was to attack Somalia. Iraq's weapons and the brutality of its government are the excuses used to justify the expanding "war on terror" which keeps the hawks in Washington in business. Iraq was substituted for Somalia partly because of its oil supplies and partly because it presents a more plausible target.

It is also clear that there is little enthusiasm in Washington either for democracy in Iraq or for Kurdish independence. Turkey, a key western ally, is fiercely opposed to Kurdish separatism. For the past six months, the US government has been questioning the legitimacy of the Iraqi opposition movement and hinting that it might replace Saddam Hussein with another military leader.

We should not, of course, ignore the possibility that the US may change its mind about the future governance of Iraq, or that a democratic revolution might be an accidental outcome of an invasion of that country. Nor should we forget that some of Iraq's oppressed peoples would welcome a war against Saddam, whoever waged it and for whatever purpose. But against their understandable enthusiasm must be weighed the global consequences of this war.

Victory in Afghanistan greatly empowered the hawks in Washington, and their hunger to attack the next target could be seen as a direct consequence. If we permit the US to march into Iraq, we open the door to an overt form of world domination, backed by force of arms.

It might seem callous to balance the fate of the Kurds and the Shi'ites against these concerns. But just because we do not favour an attack of the kind the US proposes does not mean that we cannot support attempts by other nations, whose record is unsullied and whose motives are unmixed, to destabilise or overthrow the regime, if their action is legal and if we know that this is the limit of their ambitions. Indeed, if we do succeed in preventing an attack by the US, we surely have a responsibility to lobby for a just means of helping the Iraqi people to depose Saddam, led by nations with no imperial ambitions. And we may find that this requires military force.

But even this, more legitimate warfare might not be necessary. Troy Davis of the World Citizen Foundation has been sketching out an ingenious means of pulling the rug from beneath Saddam's feet. The UN, he proposes, should help the opposition groups based abroad and in Iraq's no-fly zones to establish a democratically elected government in exile. This government is then given the world's Iraqi embassies and the nation's frozen assets. It gradually takes control of the no-fly zones and the oil-for-food programme. Saddam would find himself both isolated diplomatically and confronted by a legitimate alternative government. It is not hard to see how his authority over his own people would be undermined, permitting him to be toppled more easily. This plan also ensures that democracy is less likely to be frustrated by the installation of a puppet regime.

But if this option is tried and fails, and if war turns out to be the only means of removing Saddam, then let us support a war whose sole and incontestable purpose is that and only that; which will not stop until the people of Iraq are running their country themselves, but will stop the moment that this happens; and whose purpose is not to seize the oil wells, to support the ambitions of some of the most ruthless and dangerous people in the western world, or to overturn the norms of international law. But there will be neither a just war nor a just peace unless we stop the unjust war from being waged. Taking the government to court may be the best chance we have.