King Abdullah II of Jordan is angry. In a meeting with members of the U.S. House Armed Services Committee on Tuesday, he quoted Clint Eastwood in promising retribution against the Islamist radicals who burned a Jordanian pilot to death. He wants our support. He should get it.

Here’s my cardinal rule of foreign policy: Back your friends. Right now, the United States doesn’t have a lot of friends in the Middle East. The Saudis are nervous because the Obama administration is foolishly flirting with the bitterly anti-American regime in Iran. Turkey is wandering away from the West.

The administration has alienated Egypt, abandoned Libya and keeps arguing with Israel. Between Morocco on the Atlantic and Turkey on the Black Sea, there are weak states, failed states and occasional tyranny. The only exceptions in this disastrous region are Israel and Jordan.

Jordan has serious internal splits. It’s not a democracy. But by the low standards of the Middle East, it’s not bad. The Heritage Foundation’s Index of Economic Freedom ranks it fifth in the region; only Israel and the small Gulf emirates have economies that are significantly more open than Jordan’s.

It has at least some respect for religious and academic freedoms, and its women have equal political rights, if not equal respect. King Abdullah claims he is a descendant of the prophet Muhammed, which gives him greater popular legitimacy than the region’s nominally secular autocrats.

Jordan is also good at staying afloat. Its monarchy has survived since 1921. It has a small but competent army and an effective intelligence service. It suppressed the Palestine Liberation Organization in 1970, and in 1994 it signed a peace agreement with Israel, with which it cooperates effectively.

And it’s a longtime U.S. ally. We’ve armed Jordan since the 1960s. We concluded a free-trade agreement with it in 2001, an unmistakable sign of our support. When a U.S. airstrike killed the terrorist leader Abu Musab al-Zarqawi in Iraq in 2006, we were reportedly acting on information provided by Jordan.

It’s easy to point out Jordan’s flaws, or to say it isn’t helpful enough. I don’t enjoy advocating that we work with autocracies. We should always be honest about whom we’re cooperating with, and should look for realistic opportunities to do better. But Jordan’s in a tough spot, and a lot of foreign policy is about choosing between less-than-perfect options.

An Islamist Jordan would be a disaster, first of all, for Jordan, because Islamists excel at finding new ways to kill people. But it also would be a regional disaster. It would destroy the last traditional Middle Eastern monarchy outside the Persian Gulf, and it would put al-Qaida on Israel’s and Egypt’s borders.

Jordan is under pressure from its own radicals and from the refugees — more than a million — it has taken in from Syria. It needs help caring for those refugees. But arms sales are important, too. They demonstrate U.S. backing and help secure the regime.

Selling weapons isn’t a cure-all. We sold a lot of gear to Iraq, and it got beat anyhow. And we should never outsource decisions about selling American weapons. Just because Jordan wants something doesn’t mean we should supply it.

But when King Abdullah complains that U.S. procedures for approving arms sales are too slow, he’s right. If we’re going to sell, let’s get on with it. Obama likes “strategic patience,” but Abdullah sees his enemies on his doorstep, burning his pilot to death. He doesn’t stall: he puts on his uniform and orders airstrikes.

This is a case of back him or sack him. In 2011, we tried sacking them. We bombed Mohammar Gaddafi out of power in Libya, and cheered the overthrow of Hosni Mubarak in Egypt. Libya is now a chaotic disaster, and Egypt is more autocratic than ever. Jordan is not perfect, but it’s been an ally, and if it fell, we’d miss it. Those are the right reasons to back it now.

Originally appeared in Newsday.