When my enemy’s enemy is also my enemy, things get complicated. Few, though, could have foreseen the way the West would turn its allies into enemies and vice versa.Tensions boiled over between Saudi Arabia and Iran after the Saudis executed the demagogic Shia cleric Sheikh Nimr al-Nimr. In response, Iranian protesters torched the Saudi Embassy in Tehran.The Saudis then broke off diplomatic relations with Tehran. Iran and Saudi Arabia are now waging a cold war through their proxies for control over the region in the principal battlegrounds of Yemen, Syria, Bahrain and Iraq. Many in Israel and the West are saying “a plague on both their houses.” Both, after all, constitute major threats to people everywhere.Saudi Arabia has exported Islamic jihadi extremism throughout the world, radicalized untold millions of Muslims and spawned Islamic terrorist groups including al-Qaida – a legacy no less baleful for the fact that these groups then turned on Saudi Arabia itself.Iran, run by what is arguably the world’s principal terrorist regime, has been in a self-declared state of war with the West since 1979, regularly threatens to wipe Israel off the map and is intent on acquiring nuclear weapons.The temptation, therefore, is to hope that Saudi Arabia and Iran may each destroy the other. But this fantasy is unlikely to be realized. One of them will win. And at present, the West is rooting for the wrong one.In recent months, Western commentators have apparently finally discovered that Saudi Arabia is a serial human rights abuser. For this there is certainly no shortage of evidence. Its oppression of women, its gruesome and medieval punishment system, its brutal incarceration of the dissident blogger Saif Badawi whom it sentenced to 1,000 lashes, all bear testimony to its chilling theocratic regime.Nevertheless, the Saudis also work closely with the West against Islamist terrorism. They are also working against Iran after correctly perceiving that the US, having decided to turn Iran into a protected asset at liberty to do whatever it wants, is enabling the Iranian regime to build its nuclear bomb.This has also led to the remarkable rapprochement between the Saudis and Israel which, while it should not be over-stated, is a development which might help solve the Israel-Arab impasse.It may be no coincidence that the belated recognition among Western commentators of Saudi human rights abuses developed at the precise moment the Saudis turned toward Israel and against Iran. For while they pile opprobrium on Saudi Arabia, Western politicians and commentators claim Iran has a reformist president, that its nuclear threat has been defanged and that it serves an ally against Islamic State.In this, the West is making yet another lethal misjudgment.Iran is a police state run by religious fanatics. Last year, Saudi Arabia executed 158; Iran executed more than 850, exceeding the 743 it executed the previous year.Iran is a menace to the world. It is committed to genocide against Israel, pulls the strings of the Assad regime in Syria, uses Shia militias to destabilize Iraq and sponsors Hezbollah in Lebanon. For the past 35 years it has been attacking Western assets through terrorism.As for Islamic State, Iran’s real goal is to keep it in play in order to perpetuate the chaos and carnage in the region which enables the Iranians to move in to control events.The Obama administration’s response to the execution of Nimr was to accuse the Saudis of “exacerbating sectarian tensions” in the region. In doing so, it did not just abandon its long-standing ally by taking Iran’s side over Nimr. Since Saudi Arabia underpins the American order in the Middle East, the US response was tantamount to telling Iran it can have a free run at upending that order.This would be utterly incredible were it not for the astounding fact that the US has been systematically giving Iran a totally free pass for its genocidal and jihadi aggression.The risible nuclear deal, which purports to stop Iran from getting nuclear weapons, not only paves the way for it to build the bomb after (at best) a 10-year delay but also, through an estimated $100 billion in sanctions relief, will enable it to funnel huge amounts of cash to its terrorist proxies.The US has also totally ignored the crucial axis between Iran and North Korea, which this week claimed to have detonated a hydrogen bomb. Although Western experts believe this involved instead a fission bomb of the kind North Korea has previously detonated, the clearly accelerating threat from Pyongyang revived concerns that Iran, which is known to have close links to North Korea’s nuclear missile program, could be using it to advance its own nuclear bomb.And of course, North Korea also infamously agreed with the US to park its nuclear program, an agreement which merely paved the way for it to build its nuclear bomb.Since its own nuclear non-deal deal, Tehran has played the Obama administration for suckers and illuminated American powerlessness for the entire world to see. Far from bringing Iran in from the terrorist cold, the deal has emboldened it to become even more brazenly aggressive.It arrested two businessmen with US citizenship or residence qualifications, and sent a US journalist to prison on spying charges.Two weeks ago, it fired rockets close to the American aircraft carrier USS Truman. Last week, President Rouhani ordered his defense minister to expand Iran’s missile program.Last Tuesday, Iran unveiled a new underground missile depot, with state television showing Emad precision- guided missiles weapons that the US says are capable of carrying nuclear warheads. Like its ballistic missile tests last October and November, these violate UN Security Council resolutions.For this and other flagrant breaches of trust, the Obama administration has done nothing. Having suggested it would implement sanctions against the bodies it held responsible for aiding the missile program, it promptly retreated after a reported intervention by the State Department following Iranian objections.Iran is confident that Obama will lift sanctions whatever the regime may do, since if Iran walks away from the nuclear deal this would strip away the figleaf of progress and destroy Obama’s presumed legacy. Consequently, the only binding part of this non-deal deal has become the lifting of sanctions. Obama has effectively become Iran’s hostage.As a simultaneous consequence of this farce, the US has also lost its leverage over Saudi Arabia which almost certainly will now seek to develop or buy nuclear weapons of its own. To defuse this powder keg, the US should now cancel the Iranian nuclear deal. This would start to rein in Iran and bring Saudi Arabia down from the tree up which it has climbed.It is said that Obama thought strengthening Shia Iran would produce a regional balance of power with Sunni Saudi Arabia, and usher in an era of peace and stability. Instead, he has pushed Iran and Saudi Arabia to the brink of war with each other, ushered in a nuclear arms race between the two and brought the world much closer to the edge of the apocalypse.Melanie Phillips is a columnist for The Times (UK).