The United States and its military allies Thursday challenged U.N. Secretary General Kofi Annan's statement that last year's invasion of Iraq was an illegal act that violated the U.N. charter, and they defended their decision to topple Saddam Hussein's government.

Annan made his comments Wednesday when a reporter for the BBC questioned him about the war's legality, saying, "From our point of view and the U.N. charter point of view, it was illegal." The U.N. chief previously voiced his opposition to the invasion on the grounds that it lacked Security Council approval, which he says is required by the U.N. charter, and has challenged White House claims that the war has made the world safer from international terrorists.

In Wednesday's interview, Annan also warned that the United Nations may not be able to effectively oversee Iraq's elections next January if security does not improve. "You cannot have credible elections if the security conditions continue as they are now," he said.

The remarks about the war's legality provoked swift reaction from U.S., British and Australian officials, who said their government's legal advisers had determined that the war was justified by Iraq's failure to comply with Security Council resolutions. U.S. officials criticized the timing of the remarks, which came just days before President Bush is to address the U.N. General Assembly on Tuesday.

"If I had been his adviser, which I wasn't, I would have advised him not to say it at all -- and if he was going to say it at all not to say it now. But he did, and there's a difference of opinion," said John C. Danforth, the U.S. ambassador the United Nations. "In our view the enforcement of the 16 or 17 Security Council resolutions is clearly lawful. In fact, if Security Council resolution are not enforced, then it seems to me that there is a real shaking of the foundation of the rule of law."

U.N. officials in New York sought to play down the significance of Annan's remarks, noting that he had previously said the U.S.-led war was not "in conformity with the U.N. charter." They noted that he was prodded three times by the BBC reporter before acknowledging his position. "The secretary general was quite reluctant to use that word," said Annan's chief spokesman, Fred Eckhard.

The legality of the war has been the subject of debate among governments and international-law experts. At the outset of the war, the United States, Britain and Australia maintained in letters to the Security Council that the legal basis for the invasion lay in Iraq's violation of the terms of cease-fire agreements that ended the 1991 Persian Gulf War. But critics of the war, including Annan's top legal advisers, argued that only the Security Council possessed the authority to authorize a military invasion of a U.N. member state.

Although political leaders in Washington have scarcely questioned the war's legality, opposition leaders in Britain and Australia continue to challenge the war's legal basis. To contain political fallout from Annan's remarks, Prime Minister Tony Blair's office reaffirmed the war's legitimacy, citing a finding by Britain's attorney general, Lord Goldsmith, that Britain acted lawfully.

"There had been a series of Security Council resolutions and the advice we had [was] that it was entirely legal," Australia's prime minister, John Howard, told the Australian radio station 6PR.

France, China and other council members that opposed the war sought to stay out of the fray. "I think that all of us have views on the Iraqi war," said China's U.N. ambassador, Wang Guangya. "I think that what is important now is to help achieve peace and stability in that country."

"You know our position," French Foreign Ministry spokesman Herve Ladsous said. "We had the opportunity at the time to express ourselves very clearly."

Bush, meanwhile, stepped up his defense of U.S. action in Iraq at a campaign rally in St. Cloud, Minn., saying, "It wasn't all that long ago that Saddam Hussein was in power with his torture chambers and mass graves, and today this country is headed towards elections."

Bush said that he had gone to the United Nations to rally international support for tough action against Iraq but that Hussein continued to flout the will of the international body.

"So I have a choice to make at this time. Diplomacy isn't working. Do I forget the lessons of September the 11th and trust a madman, or do I take action to defend this country?" he said.

"It was illegal," Kofi Annan told a BBC reporter.