Bargains with the devil never end well. For decades, successive U.S. administrations have embraced autocratic, repressive regimes in the Arab world - and now, as we see in the bloody streets of Cairo, it's time to pay the price.

Officials in Washington could do little more than watch helplessly Wednesday as goon squads loyal to dictator Hosni Mubarak made a violent attempt to drive pro-democracy protesters out of Tahrir Square. Before learning of the deadly raid, White House chief of staff Bill Daley gave this honest assessment: "We don't control this. And even though we like to think at times that we can control everything in the world . . . it truly is not up to us."

Not at this point, obviously. President Obama's call for Mubarak to begin a transition "now" has drawn haughty defiance from the dictator and his courtiers. "Now" apparently means "in September, maybe" - Mubarak says that he will not run for president this fall and that he did not intend for his son to succeed him, although few believe a man so accustomed to ruling like a pharaoh could preside over a genuine democratic transformation.

No one should be shocked to learn that Mubarak is, in fact, a dictator. He has been a dictator since the moment he assumed power following the assassination of Anwar Sadat. But the United States and its allies have taken the position that despotism is acceptable in the Middle East, as long as the despots in question provide useful services.

You will recall that even Saddam Hussein was once in the "useful tyrant" category, partly because of Iraq's huge oil reserves and partly because he had been considerate enough to launch a war against Iran. Only after invading Kuwait and threatening Saudi Arabia did he move to the top of the U.S. enemies list; the despotic royal families that rule the oil-rich kingdoms and sheikdoms lining the Persian Gulf are more useful than Hussein ever was.

The United States and other free-market democracies were implacably opposed to the communist tyranny of the Soviet Union. Theoretically, we also have irreconcilable differences with the repressive present-day regime in China, too - although we don't talk about them much, given China's new role in the global economy as the lender of last resort.

There was a time when U.S. officials thought nothing of cozying up to murderous dictatorships throughout Latin America. As long as they were anti-communist, we could work with them - even if they rounded up thousands of suspected leftists, subjected them to unspeakable torture and finally threw them out of helicopters to their deaths, as was the practice of the sadistic military junta in Argentina.

Today's despots get a similar pass from U.S. policymakers by being anti-terrorist. There are other factors, too, depending on the dictator in question. Mubarak faithfully observed the peace treaty that Sadat negotiated with Israel. The royals who hold absolute sway in Saudi Arabia, Kuwait and the other Persian Gulf monarchies guarantee the supply of oil that fuels the global economy. But the "with us or against us" acid test is whether the repressive government in question cooperates in the fight against al-Qaeda and other terrorist groups.

A U.S. diplomatic cable written in February 2010, released last week by WikiLeaks, describes how the State Department pressured Egyptian officials on the Mubarak government's indiscriminate use of the "emergency law," which allows indefinite detention. Officials from the Egyptian Interior Ministry responded that the law is a necessary tool to combat an "acute terrorist threat" from groups such as the banned Muslim Brotherhood.

Why, then, had a Coptic Christian blogger been detained for more than a year without charges under the emergency law? Egyptian officials claimed that the man was being held "for his own security."

The Egyptians said they were working on a new, narrower, less repressive anti-terrorism law. Just as the Saudis, Kuwaitis, Yemenis, Jordanians, Algerians, Syrians, Sudanese and others are always working on reforms to allow basic human and political rights - but never get very far.

Now everything has changed.

If the Egyptian regime can be challenged by ordinary citizens demanding freedom and democracy, any regime in the Arab world can be so challenged. The United States will not be able to dictate events, but neither will it be able to stand idly by - not where our non-democratic allies are concerned.

When push comes to shove, American officials must uphold American values. We made a bargain whose term has lapsed. Settling final accounts will not be pleasant.

eugenerobinson@washpost.com