ABU DHABI, United Arab Emirates (CNN) -- President Bush said Sunday that Iran is threatening the security of the world, and that the United States and Arab allies must join together to confront the danger "before it's too late."

President Bush delivers speech critical of Iran on Sunday in Abu Dhabi.

Bush said Iran funds terrorist extremists, undermines peace in Lebanon, sends arms to the Taliban, seeks to intimidate its neighbors with alarming rhetoric, defies the United Nations and destabilizes the entire region by refusing to be open about its nuclear program.

"Iran is the world's leading state sponsor of terror," Bush said in a speech he delivered about midway through his eight-day Mideast trip that began with a renewed push for an Israeli-Palestinian peace pact -- an accord he said whose "time has come."

Bush also chided U.S. allies who have withheld civil liberties, saying governments will never build trust by harassing or imprisoning candidates and protesters. But his rebuke was general, and he did not single out any U.S. partner in the region for oppressive practices.

"You cannot expect people to believe in the promise of a better future when they are jailed for peacefully petitioning their government," Bush said. "And you cannot stand up a modern, confident nation when you do not allow people to voice their legitimate criticisms." Watch excerpts from Bush speech »

Bush gave the speech on democracy in one of the few countries in the region -- the United Arab Emirates -- where democracy has been virtually ignored. In other countries in the region, especially Egypt, the fight between democracy activists and autocratic governments has been much more pointed and controversial.

He called on the Palestinians to reject extremists, although he did not mention the Islamic radical group Hamas, which has gained control of Gaza. And he said the Iranian government in Tehran should make itself accountable to its people.

"Iran's actions threaten the security of nations everywhere," Bush said. "So the United States is strengthening our long-standing security commitments with our friends in the Gulf, and rallying friends around the world to confront this danger before it is too late."

Bush spoke at the Emirates Palace, at an opulent, gold-trimmed hotel where a suite goes for $2,450 a night. Built at a cost of $3 billion, the hotel is a kilometer long from end to end and has a 1.3 kilometer white sand beach -- every grain of it imported from Algeria, according to Steven Pike, a spokesman at the U.S. Embassy here. Half the audience was dressed in western attire and the other half in Arabic clothes -- white robes and headdresses for men and black abayas, many with jeweled edges, for women.

Bush said advancing democracy and freedom is the core of his administration's foreign policy and critical to U.S. security.

"The United States has no desire for territory. We seek our shared security in your liberty. We believe that stability can only come through a free and just Middle East where the extremists are marginalized," the president said.

He noted democratic reform in Iraq. "You have made your choice for democracy and have stood firm," Bush said, speaking to the Iraqi people. "The terrorists and extremists cannot prevail." Watch report on the state of democracy in the United Arab Emirates. »

Making an equally direct appeal to the Palestinians, Bush said "The dignity and sovereignty that is your right is within your reach."

In renewing his "Freedom Agenda" -- Bush's grand ambition to seed democracy around the globe -- he declared that "democracy is the only form of government that treats individuals with the dignity and equality that is their right."

"We know from experience that democracy is the only system of government that yields lasting peace and stability," he added.

Yet he was speaking about democracy in a deeply undemocratic country, the Emirates, where an elite of royal rulers makes virtually all the decisions. Large numbers of foreign resident workers have few legal or human rights, including no right to citizenship and no right to protest working conditions.

Some human rights groups have accused the Emirates of tolerating virtual indentured servitude, where workers from poor countries like Sri Lanka are forced to work to pay off debts to employers, and have their passports seized so they can't leave.

Officials in Abu Dhabi and the neighboring emirate of Dubai have said they are taking slow and gradual steps toward reform, both democratic and in labor rights.

In the country's first-ever elections in late 2006, the government hand-picked a group of voters to cast ballots to choose members of a government advisory panel.

But there is little clamor for elections in a wealthy country whose citizens are a privileged minority with access to free housing and lucrative government jobs. Many here say the galloping economy is evidence the government has done a good job.

Earlier Sunday in Bahrain, U.S. Vice Adm. Kevin Cosgriff, commander of the U.S. Navy's 5th Fleet, which patrols the Gulf, told Bush that he took it "deadly seriously" when an Iranian fleet of high-speed boats on January 6 charged at and threatened to blow up a three-ship U.S. Navy convoy passing near Iranian waters. The Iranian naval forces vanished as the American ship commanders were preparing to open fire.

Bush spoke with Cosgriff after he had a breakfast of pancakes and bacon with troops of the U.S. 5th Fleet based in Bahrain.

In visits over three days in Kuwait, Bahrain and Abu Dhabi, Bush also was urging continued and visible Arab support for fragile peace talks between Israel and the Palestinians. Arab backing, and probably funding, is considered essential to make any agreement stick. E-mail to a friend

Copyright 2008 CNN. All rights reserved.This material may not be published, broadcast, rewritten, or redistributed. Associated Press contributed to this report.

All About Kuwait • Iraq • Iran • Bahrain