This is the most lawless war of our generation. All wars of aggression lack legitimacy, but no conflict in recent memory has witnessed such mounting layers of illegality as the current one in Somalia. Violations of the UN charter and of international humanitarian law are regrettably commonplace in our age, and they abound in the carnage that the world is allowing to unfold in Mogadishu, but this war has in addition explicitly violated two UN security council resolutions. To complete the picture, one of these resolutions contravenes the charter itself.

The complete impunity with which Ethiopia and the transitional Somali government have been allowed to violate these resolutions explains the ruthlessness of the military assaults that have been under way for six weeks now. The details of the atrocities being committed were formally acknowledged by a western government for the first time when Germany, which holds the current EU presidency, had its ambassador to Somalia, Walter Lindner, write a tough letter - made public on Wednesday - to Somalia's president, Abdullahi Yusuf.

The letter condemned the indiscriminate use of air strikes and heavy artillery in Mogadishu's densely populated areas, the raping of women, the deliberate blocking of urgently needed food and humanitarian supplies, and the bombing of hospitals. This is a relentless drive to terrify and intimidate civilians belonging to clans from whose ranks fighters are challenging the occupation.

There was a time when security council resolutions were hallowed in most of the world, as for example resolution 242 demanding the return of occupied Palestine territory in exchange for peace. But in our new world order, the powerful decide which UN resolutions are passed, and whether they need to be honoured. So the United States, which was violating the UN arms embargo on Somalia, rushed through another resolution in December that it thought would better serve US goals - and then proceeded to violate that one as well.

The new resolution forbade neighbouring countries from being part of the regional peacekeeping force the security council authorised for Somalia; but Ethiopia went much further and unilaterally invaded, with the covert assistance of the US - which also joined the war by bombing Somalia.

This December resolution actually contravened the charter itself, because it made the security council the aggressor and turned a clearly peaceful situation into war. The resolution linked the Islamic Courts government to international terrorism and mandated peacekeeping force, on the basis of chapter VII of the UN charter, to address the "threat to international peace and security" that Somalia posed - when every independent account, including Chatham House's on Wednesday, indicated that the country was experiencing its first peace and security since 1991.

The resolution paved the way for the Ethiopian invasion that has led to the bitter conflict that many independent analysts, including those at a meeting in Addis Ababa organised by Ethiopia's Inter-Africa Group, had warned would be the inevitable result. A government imposed through force by arch enemy Ethiopia was never going to hold sway.

The long silence and the refusal even now to announce measures that might arrest this slaughter mark the lowest point in the big powers' abdication of the "Responsibility to Protect" mandate - adopted, with British leadership, at a summit-level meeting of the security council two years ago. The world's most impoverished people are now being ripped to shreds with no effort whatsoever to get the perpetrators to desist.

A huge campaign must be launched to press western governments to end this slaughter, which is almost entirely the work of those in control of the country. The European Union warned a month ago that war crimes might have been committed in an assault on the capital last month - in which the EU could be complicit because of its large-scale support for those accused of the crimes. Human Rights Watch has documented how Kenya and Ethiopia had turned this region into Africa's own version of Guantánamo Bay, replete with kidnappings, extraordinary renditions, secret prisons and large numbers of "disappeared": a project that carries the Made in America label. Allowing free rein to such comprehensive lawlessness is a stain on all those who might have, at a minimum, curtailed it.

Work must begin to derail the astounding proposal from the United Nations secretary general, Ban Ki-Moon, which is to be discussed by the security council in mid-June. He would like to mount a UN-sanctioned "coalition of the willing" to enforce peace and restore order in Somalia - in other words, the UN would help Ethiopia and the United States achieve what their own illegal military interventions have failed to accomplish: the entrenchment of a client regime that lacks any popular support. Such an operation is unlikely to succeed in any event, but it could further threaten the turbulent Horn of Africa, which is already teetering on the brink of chaos.

The Somali government is busy crying "al-Qaida" at every turn and offering lucrative deals to oil companies, in a bid to entice greater western support. But this war was lost long ago. In turning to the arch enemy Ethiopia, the transitional government's fate was sealed: the nation will not abide an Ethiopian-US occupation.

Only a political solution will resolve this crisis. Africa must step up to the plate and show spine and leadership in a drive to protect its civilians, and work with Europe and the UN to convince the US to swiftly terminate its latest destabilising adventure.

· Salim Lone, who was the spokesman for the UN mission in Iraq after the 2003 invasion, is a columnist for the Daily Nation in Kenya

salimlone@yahoo.com