Secretary of State Condoleezza Rice Wednesday defended the Bush administration's support for democratic reform and elections in the Middle East, even though recent voting has produced wins for radical groups, including Hamas in the Palestinian territories. In Senate testimony, she also again ruled out U.S. aid for any new Palestinian government that does not recognize Israel.

The secretary's appearance before the Senate Foreign Relations Committee was ostensibly to defend the Bush administration's $35 billion foreign affairs budget for next year.

But she spent more time defending administration policies in the Middle East, including its backing for elections in the region that have yielded political gains for conservative Shi'ites in Iraq, the Muslim Brotherhood in Egypt and most recently the radical Palestinian faction Hamas.

The election results drew critical questions from several committee members including California Democrat Barbara Boxer. She said the Bush administration has been repeatedly caught off-guard by the election results, which she said show that the Middle East is changing, but not for the better.

"This administration seems to have a tin ear when it comes to the Middle East, and that tin ear is making us less safe," she said. "Secretary Rice, do you really believe that elections in the Middle East, where these kinds of terrorist and extremist groups are being chosen, and I know Senator [Joseph] Biden went into who they are, do you think that's working to the benefit of the United States."

The secretary of state, in a sharp exchange with Senator Boxer, said her question assumed that the Middle East was somehow better off with rulers like Saddam Hussein and Yasser Arafat still in power, or with Syria still occupying Lebanon.

She said there have been election outcomes that were not perfect, but said she still believes the process has made the world - which she described as being in a transitional stage - a better place:

"The United States is standing for its principles, which is that the people of the Middle East, the people of Latin America, ought to be able to choose their leaders," she said. "Now there are times when elections turn out in ways that we would prefer they did not. Clearly the election of Hamas is a difficult moment in the prospects for peace between the Palestinians and the Israelis. But the Palestinian people got a chance to go to the polls and express their desire for change. They have done so, and now the international community will hold Hamas responsible for the policies that it undertakes."

The secretary said U.S. Middle East policy over six decades had supported authoritarian governments, which closed off the political space for moderate parties and caused radical factions to develop on the margins.

She said it is too much to expect that mainstream political movements would spring up overnight.

Under questioning from Republican Senator George Allen, Ms. Rice said she concurred with him that no U.S. aid money should go to a Hamas-led Palestinian government that did not recognize Israel's right to exist and renounce terrorism.

However, she left the door open to continued American humanitarian aid to Palestinians, provided it was administered directly by non-governmental organizations or U.N. agencies.

"I do think we want to continue to be responsive on humanitarian needs," she said. "I think it would not be in our character to refuse to immunize Palestinian children because Hamas is in the government. But that portion of the funding that would go to support the government, whether it's reconstruction projects or budget support or anything of the like, we've been very clear that unless the Palestinian government - of whatever its composition - is prepared to recognize Israel and to carry out the other requirements of the 'Quartet,' that no money will go to that government."

The Quartet - the United States, Russia, the European Union and the United Nations - laid down strict terms for aid to a new Palestinian government at a London meeting two weeks ago.

This year, the United States is providing more than $230 million to the Palestinians, about a third of it distributed through the United Nations.