On the same week the IAEA referred Iran’s outlaw nuclear program to the UN Security Council and Tehran vowed to inflict “harm and pain” on the United States, Congress forced a Dubai-based company to surrender its ownership stake in a half-dozen US ports. Sooner or latter, America will come to regret this bipartisan spasm of fear.

Moderate, friendly governments are a rare commodity in the simmering Middle East. But Dubai and the other five mini-states that make up the United Arab Emirates can be counted among that number—or at least could be, until last week.

It pays to recall that the UAE hosts more US warships than any other foreign port—more than Japan or Australia or Great Britain or Italy. In fact, some of those ports are managed by the company at the center of this firestorm, Dubai Ports World (DPW).

The UAE has given over-flight rights, provided logistical help and set aside territory to support the US-led war on terror. Just as important, it has intercepted al Qaeda’s blood money and supported the nascent democracies in Afghanistan and Iraq.

The critics are quick to point out that the UAE was one of a tiny handful of countries to recognize the Taliban. True. Of course, its rationale was no different than Washington’s rationale in recognizing Saddam Hussein as a bulwark against a revolutionary Iran. Just as America plays realpolitik, so do others.

Moreover, Pakistan effectively created the Taliban; and the US counts it as an ally. French firms propped up Saddam Hussein; and the French government ran diplomatic interference for him; yet the US calls Paris its oldest ally. Trade flows from Japan and the EU help keep the Iranian regime in power; and yet the US calls them allies.

Unlike some of those allies, the UAE immediately fell in line behind Washington after 9/11, cutting ties with Kabul and then offering its territory and resources in service to Operation Enduring Freedom and Operation Iraqi Freedom. Indeed, the UAE was the first Middle East country to sign on to the US-led Container Security Initiative, which deploys US Customs agents to the world’s largest, busiest ports to screen goods and containers coming into the United States before they arrive here.

It pays to recall that this war has never been popular in the Middle East; yet even after this unpopular war turned bloody and protracted, the UAE stuck with America. As The Hill newspaper reported last week, 56 US warships and 590 supply ships docked in Dubai in 2005 alone. Plus, almost 80,000 US troops went on leave in the UAE last year.

But none of that mattered to Congress and the opportunistic press, which after pounding the Bush administration for being insensitive to Islam now pounds the administration for treating a company based in an Islamic country just like any other firm.

Therein lies the problem, at least from the perspective of those who waged and won this preemptive war against DPW. “The unilateral decision of the Bush administration to allow the sale of port operations to a foreign government raises serious national security concerns,” huffed Congresswoman Nancy Pelosi. “In the post-9/11 world,” added Congressman Peter King, “there should have been a presumption against this company.”

But why? Why does a company from an allied country that happens to be Islamic have to prove something more than a company based in an allied country that happens to be secular or Anglican, Shinto or Hindu? In fact, one could argue that given the support the UAE has provided the US throughout the war on terror, and during the phony war against Saddam’s regime in the 1990s, and during Desert Shield and Desert Storm, and during the tanker wars of the 1980s, there should have been a presumption of support.

Were “serious national security concerns” raised, to borrow Minority Leader Pelosi’s phrase, when British or Chinese or Korean firms ran the ports? Did she know that in her home state of California, 80 percent of the sea terminals at the Port of Los Angeles are run by foreign firms?

Reasonable people can disagree about the soundness of US ports being under foreign operation or management. Doubtless, many Americans were surprised to learn during the Dubai debate that so many ports are managed by non-US firms. But this fear reflex didn’t kick in until a company from an Islamic, Arab country acquired a handful of ports.

Whether intended or not, this sends an unmistakable message to friend and foe: The enemy will point to Washington’s spurning of Dubai as evidence of American bigotry and proof that moderation leads to nothing more than global embarrassment. And allies are learning that America may or may not reward those who take risks and make sacrifices. It all depends on which way the chill wind of fear and suspicion is blowing.

Some fears are justified, but some are not. Given the sheer number of US ports and volume of activity they generate, fear of DPW was misplaced. After all, long before DPW acquired these ports from a British firm, critics like Sen. John Kerry were warning that less than five percent of the containers coming into US ports are screened. If those percentages are correct, that means 5.7 million unchecked cargo containers stream into our ports every year.

In other words, if the enemy wants to strike the ports that dot America’s vast coastline, he can do so without co-opting some multinational port-management firm. Recall that the mass-murderers of 9/11 didn’t maim Manhattan by infiltrating the corporate hierarchy at American Airlines or United Airlines. If their kindred killers want to destroy a port or sneak sleeper cells into the country via the harbors of Boston, New York or Baltimore, they won’t need any help from DPW or the people who own it.

However, when push comes to shove in Iran, when the world turns to Washington to defuse that time bomb, America will need help from places like the UAE. And when that moment comes, Americans may find the ports and airspace of Dubai closed to foreigners.