The United States would have a hard time accepting an Islamic theocracy in Iraq, even if its leaders are popularly elected, two senators said yesterday.

Appearing on separate Sunday news shows, Sen. Richard G. Lugar (R-Ind.) and Sen. Joseph I. Lieberman (D-Conn.) said that whether such a government arises depends, in part, on U.S. officials' commitment to working with Iraqi leaders who view tolerance and freedom as essential to a democracy.

The concern comes as Shiite groups, some backed by Iran, escalate their demands for political control in a new Iraq.

Tens of thousands of Iraqi Muslims took to the streets of Baghdad last week to demand the exit of U.S. and other foreign forces and the establishment of an Islamic state.

"We've got to realize that the institution-building process in Iraq is a huge endeavor," Lugar, chairman of the Senate Foreign Relations Committee, said on NBC's "Meet the Press." "There's not much to work with at this point. . . . But this is why we have to have a long-range time frame. The thought of going to elections prematurely is disastrous."

Lugar said that it could be five years before democracy takes root in Iraq, and that talk of the process taking four or five months is unrealistic.

Lieberman, appearing on CBS's "Face the Nation," said, " . . . Obviously, we don't want this to turn into a theocracy." The demonstrations were expressions of religious freedom not possible under Saddam Hussein and were not necessarily evidence of widespread anti-U.S. sentiment, he said.

"It's only a small group that has demonstrated for what seems like an Islamic state," Lieberman said. "They may be jockeying for power within post-Saddam Iraq, themselves. It seems to me that the majority of the Iraqis . . . will not want to go back to another form of dictatorship and loss of freedoms through a theocracy. They'll want to have a democracy in which all religions, and all forms of Islam, particularly, are free to be observed in whatever way people want to observe them."

Lugar and Lieberman also criticized the Bush administration as ill-prepared to deal with the increase in humanitarian concerns and civil unrest that followed the military triumph in Baghdad and other cities.

"A gap has occurred, and that has brought some considerable suffering," Lugar said. He added that "vacuums are there that are being filled by the Shiite Muslim rallies and others who want a theocratic state."

President Bush, addressing reporters outside a church near his ranch in Crawford, Tex., said he is not worried that anti-U.S. demonstrations by religious groups will hurt the rebuilding effort.

"I always said democracy is going to be hard," Bush said. "It's not easy to go from being enslaved to being free. But it's going to happen. . . . They want to be free. And so, sure, there's going to be people expressing their opinions, and we welcome that. Just like here in America. People can express their opinions."

Richard N. Perle, a member of an influential Pentagon advisory board and a longtime advocate of going after Hussein, said he believes Iraqis will opt for freedom and pluralism after living through "a quarter of a century of brutal oppression." But if they choose to create an Islamic theocracy, the United States will have to live with that choice, Perle said.

"If we want, as I believe we must, democratic rule in Iraq, then we will have to accept the consequences of freely chosen leaders by the Iraqis," he said. "That's where legitimacy lies, not in some bureaucracy either from New York or elsewhere, but in what the people of Iraq want for themselves."