Amid the continuing brouhaha about issues of race and gender in the US presidential campaign, we may be in danger of losing sight of the most important question that has arisen in the candidates' skirmishing over international affairs. That relates to John McCain's advocacy of the establishment of a "league of democracies", and the mounting clamour for Barack Obama to espouse the same idea as his own.

McCain says he'd establish the league in his first year in office: a close-knit grouping of like-minded nations that could respond to humanitarian crises and compensate for the UN security council's tendency to be hamstrung by the likes of Russia and China when it needs to take decisive action against the world's evil-doers. Neocon guru Robert Kagan, an avid proponent, says: "The world's democracies could make common cause to act in humanitarian crises when the UN security council cannot reach unanimity." The league's strength would be that it "would not be limited to Europeans and Americans but would include the world's other great democracies, such as India, Brazil, Japan and Australia, and would [therefore] have even greater legitimacy".

The idea has also been embraced by many Obama supporters, notably Ivo Daalder, a foreign policy adviser to the Illinois senator, and Anthony Lake, his senior international affairs adviser. "Crises in Iran, North Korea, Iraq and Darfur," Lake writes, "not to mention the pressing need for more efficient peacekeeping operations, the rising temperatures of our seas and multiple other transnational threats, demonstrate not only the limits of American unilateral power but also the inability of international institutions designed in the middle of the 20th century to cope with the problems of the 21st." In other words, the institutions so painstakingly built up out of the ashes of the second world war have passed their use-by date, and it's time to move on.

One doesn't have to be a starry-eyed devotee of the UN to ask everyone to take a deep breath before the runaway popularity of this idea becomes consensual in Washington. No one disagrees that our international institutions need reform to make them reflect the realities of a post-American world, but that's not where the advocates of an alternative are coming from.

The world has just, less than two decades ago, come out of a crippling cold war. We are moving fitfully to a world without boundaries, one in which America's biggest potential geopolitical rival, China, is also its biggest trading partner. If we were to create a new league of democracies, who would we leave out? China and Russia, for starters - a former superpower and a future one, two countries without whom a world of peace and prosperity is unimaginable. Instead of encouraging their gradual democratisation, wouldn't we be reinforcing their sense of rejection by the rest? Might the result be the self-fulfilling prophecy of the emergence of a league of autocracies with these two at the helm?

But would all democracies even join such a league? Not if the price were the alienation of vital trading partners, resource suppliers or simply neighbours who happen to be non-democracies. Democracies like India and France have proved prickly in the past about countries like the US or Britain assuming that their internal political arrangements would necessarily govern their foreign policy choices. Many democracies have other affinities that are as important to them. India, for instance, may count solidarity with other former colonies, or with other developing countries, as more important than its affiliation with a league of democracies; southeast Asian democracies might prefer their regional alliance with autocracies in Asean. The American notion that a collection of democracies would inevitably be an echo-chamber for an American diagnosis of global problems is a fantasy.

The claim that a league of democracies would be less likely to be paralysed into inaction over, say, sanctions on Iran, than a security council with the likes of Russia or China on it, overlooks the basic fact that it is in the nature of democracies to differ, to argue among themselves, and to be responsive to the very different preoccupations of their own internal constituencies. Had a league of democracies existed during the apartheid years, would Washington have been persuaded by a democratic majority to intervene against Pretoria? The very question points to the risibility of its premise.

The advocates of a league of democracies argue that it would intervene more effectively in cases like Darfur or the cruel indifference of the military regime in Burma to the sufferings of its cyclone victims. That is a delusion. Such interventions have not occurred because they are impracticable. Humanitarian aid could not have been delivered effectively in the Irrawaddy delta in the teeth of active resistance by the Burmese junta, or in Darfur by going to war with the Sudanese army, unless the countries wishing to do this were to be prepared to expend a level of blood and treasure that democracies rarely risk for strangers. It is one thing to march into a chaotic, government-less Somalia to protect the delivery of aid, quite another to confront the organised military force of a sovereign state defending its own territory.

It is also specious to argue that collective action by a group of democracies (when the UN is unable to act) would enjoy international legitimacy. The legitimacy of democracies comes from the consent of the governed; when they act outside their own countries, no such legitimacy applies. The reason that decisions of the UN enjoy legitimacy across the world lies not in the democratic virtue of its members, but in its universality. The fact that every country in the world belongs to the UN and participates in its decisions gives the actions of the UN - even that of a security council in urgent need of reform - a global standing in international law that no more selective body can hope to achieve.

This is the time to renovate and strengthen the UN, not to bypass it. As the post-cold war "unipolar moment" slowly but surely makes way for a world of multiple power centres and a rising new superpower, there has never been a greater need for a system of universally applicable rules and laws that will hold all countries together in a shared international community. We all hope that, in an era of instant communications and worldwide information flows, this community will be an increasingly democratic one. Subtracting today's democracies from it will have the opposite effect.

· Shashi Tharoor is a former UN under-secretary general

shashitharoor.com