By most measures, the U.N. flunked the Bush test. The Security Council spoke of serious consequences, but refused to support the war. In the president’s terms, the U.N. was now irrelevant.

Yet there was President Bush again on Tuesday, standing by the same green marble. On the sidelines, his diplomats were pressing for U.N. help to rebuild Iraq while Bush made his own case. Rather than irrelevent, the United Nations he described in his speech is doing “vital and effective work” in Iraq. According to the president, the U.N. is now even united about its “fundamental principles” including global security and human rights. “So let us move forward,” he urged.

Maybe the president missed the speeches delivered before he reached the podium. But they hardly sounded as if the United Nations and the Bush administration agree at all about those fundamental principles, or, for that matter, about world security.

The day began with Kofi Annan, the U.N.’s secretary general, launching an unusually aggressive attack on the very basis for going to war in Iraq–and the Bush administration’s foreign policy in general. Without mentioning Iraq or the United States by name, Annan condemned the notion of pre-emptive strikes, saying they could lead to “the unilateral and lawless use of force.”

“This logic represents a fundamental challenge to the principles on which, however imperfectly, world peace and stability have rested for the last 58 years,” he warned.

Last year Bush said Iraq was the main threat to the U.N. and to peace. This year Annan said Bush’s policy was a threat to the U.N. and to peace. For a U.N. that remains traumatized by terrorist attacks in Baghdad, that was hardly a rallying cry to help the U.S. in Iraq. So much for unity on fundamental principles.

President Lula da Silva of Brazil–fresh from his triumph in sinking the world trade talks in Cancun–followed by echoing the French position about Iraq’s reconstruction. He demanded “a central role” for the United Nations and transfer of sovereignty to the Iraqis “as soon as possible.” He continued: “A war can perhaps be won single-handedly. But peace–lasting peace–cannot be secured without the support of all.”

Then there was French President Jacques Chirac. A couple of weeks ago, State Department officials thought they had a strategy to isolate France inside the U.N. over its proposals to reshape Iraq. Instead, Chirac on Tuesday looked and sounded as if were leading mainstream opinion at the U.N.. Speaking to reporters after a private session with Bush, Chirac was in no mood to compromise. He said that Iraqis would not “accept a situation which is an occupation of their country” and predicted “a further deterioration of the situation” in Iraq.

Even America’s closest allies are moving a very long way from Washington. Bush hailed Jose Maria Aznar of Spain on Tuesday as his “steadfast friend”. Yet Aznar was in Libya last week, cozying up to Muammar Gaddafi, the Libyan leader many U.S. officials believe is pursuing weapons of mass destruction and maintaining his ties to terrorist groups. And Tony Blair, the British prime minister, was a no-show at the United Nations (in contrast to his European counterparts) at the very moment when his friend George W. Bush was appealing for the world’s help in Iraq.

Bush’s day at the United Nations could have been worse. The French have ruled out vetoing the latest American resolution on Iraq. Relations between Washington and Berlin have warmed up markedly. And there will be some small contributions of troops and cash in Iraq, even if they are nowhere near enough to make much of a difference on the ground.

Yet these are tiny gains at a time when the United States is engaged in the monumental tasks of fighting international terrorism, recreating Iraq in its own image, and transforming the entire Middle East.

Before the war in Iraq, it became something of a cliche to warn that the United States could win the war and lose the peace. In fact the reality at the United Nations this week is that the Bush administration has won the war and lost much of the rest of the world. With enough time, money and bloodshed, the United States will bring peace to Iraq. But it remains a long, long way from winning back its friends and allies in the international community.