WASHINGTON — Two different White Houses, two different speeches.

In June 2005, Secretary of State Condoleezza Rice stood before an audience of 600 at the American University in Cairo, assailed the Egyptian government for intimidating and locking up protesters and called for President Hosni Mubarak to hold free elections. “For 60 years, my country, the United States, pursued stability at the expense of democracy in this region here in the Middle East, and we achieved neither,” said Ms. Rice, infuriating the Mubarak government and heartening opposition leaders like Ayman Nour, an oft-jailed Parliament member, with whom she even held a meeting as part of her trip.

In June 2009, President Obama stood before an audience of 3,000 at Cairo University, and took a far gentler tone. “I do have an unyielding belief that all people yearn for certain things: the ability to speak your mind and have a say in how you are governed, confidence in the rule of law and the equal administration of justice, government that is transparent and doesn’t steal from the people, the freedom to live as you choose,” Mr. Obama said. But he then added, “There is no straight line to realize that promise.” Mr. Mubarak’s officials were euphoric after his speech; one called it “seminal.”

In the end, neither speech may have made much of a difference.

The chaos unfolding in Egypt is laying bare a stark fact, Middle East experts say: In the Arab world, American words may not matter, because American deeds, whatever the words, have been pretty consistent. Ever since that March morning 31 years ago, when Anwar el-Sadat reached out to clasp hands with Menachem Begin on the North Lawn of the White House after signing the Camp David peace treaty with Israel, the United States government has viewed the Egyptian government, no matter how flawed or undemocratic, as America’s closest ally in the Arab world.

Even when Ms. Rice and the Bush administration were infuriating Mr. Sadat’s successor, Mr. Mubarak, and calling for democracy in the Middle East, the reality was that the two governments were still, at their core, allies. Mr. Mubarak never forgave the Bush administration for the public flogging, officials in that administration say, but he met with Ms. Rice and President George W. Bush whenever they came through the region, and remained involved in Mr. Bush’s late efforts to negotiate Middle East peace.