Editor's note: David Frum writes a weekly column for CNN.com. A special assistant to President George W. Bush from 2001 to 2002, he is the author of six books, including "Comeback: Conservatism That Can Win Again," and is the editor of FrumForum.
Washington (CNN) -- President Barack Obama is wrestling with a decision whether or not to intervene in Libya.
Here is a consideration that should top the president's thinking process: What message will it send if Moammar Gadhafi survives?
An anti-American, anti-Western supporter of international terrorism can hold power by killing large numbers of his own people. Meanwhile, nondemocratic rulers aligned with the West are nudged from power by their former friends.
If you were the king of Saudi Arabia, what conclusion would you draw? Would you not assess: It's a lot safer to be an American enemy than an American friend? After all, an American enemy can use maximum violence with impunity.
Let's do a quick tally of the Middle East's nondemocratic leaders.
America's friend Hosni Mubarak? Gone.
America's friend Zine El Abidine Ben Ali? Gone.
America's friend the king of Bahrain? Wobbling.
America's friend the king of Jordan? Shaken.
On the other side of the ledger:
America's enemy, the Iranian theocracy? The mullahs unleashed ferocious repression against democratic protesters in the summer of 2009 and kept power.
Hezbollah? It brought down the Lebanese government to forestall a U.N. investigation into the terrorist murder of Lebanese Prime Minister Rafik Hariri.
Hamas? Last month it banned male hairdressers in Gaza from cutting women's hair, the latest zany ordinance from the self-described Islamic movement.
If Gadhafi and Iranian President Mahmoud Ahmadinejad still rule territory in a month's time, and if Hezbollah and Hamas continue to rely on their armed presence to back up the militant policies they impose, the promises of Middle Eastern democracy will look very hollow. And the incentive structure of the Middle East will acquire a sinister new look.
Gadhafi's departure from power in other words is not just a requirement of humanity and decency. It's not only justice to the people of Libya. It is also essential to American credibility and the stability of the Middle East region.
Obama already has said that Gadhafi "must" go. Gadhafi is not cooperating -- and to date, the insurgents have lacked the strength to force him.
The United States paid a heavy price for encouraging Iraqis to rebel against Saddam Hussein in 1991, then standing by as the Iraqi leader slaughtered rebels from the air. We still pay that price, for the memory of the slaughter is a crucial element in the distrust that so many ordinary Iraqis felt for the United States after Hussein's ouster in 2003.
The president must not repeat that mistake. He's already committed himself. Now the only choice he faces is whether his words will be seen to have meaning -- or to lack it.
The opinions expressed in this commentary are solely those of David Frum.