Saudi Arabia has drawn a lot of criticism lately for its leading role in the war against Houthi rebels in Yemen. Some deride the kingdom, the richest Arab state, for taking action against the poorest. Others have claimed that the fight against the Houthis – a Zaidi Shiite-led religious-political movement – is just one element in a broader war on the Shiites that Saudi Arabia has supposedly been waging. These are simplistic claims, reflecting a fundamental misunderstanding about the kingdom’s role in Yemen – and, indeed, in the entire Arab world.

Saudi Arabia is not out to get the Zaidis. In fact, it actively supported the Zaidi royal family in Yemen’s civil war in the 1960s.

What the kingdom has reacted to in Yemen is Iran’s cynical efforts to take advantage of Yemen’s internal conflict to build a military alliance with the Houthi rebels – an alliance with only one conceivable target: Saudi Arabia.

Yet when Saudi officials tried to warn the international community about Iran’s activities in Yemen, it was met with denial.

Western commentators, in particular, have twisted themselves into knots to avoid recognizing any Iranian involvement in the conflict, even as evidence to the contrary has mounted.

In the last 18 months, the U.S. Navy has intercepted four arms shipments from Iran to Yemen. Iran itself has claimed numerous times that it controls four Arab capitals, including Sanaa, and the Houthis have become closely tied with Hezbollah, Iran’s Lebanese political and military proxy.

In fact, Hezbollah’s leader Sayyed Hasan Nasrallah has claimed the Houthi cause as his own, allowing Houthi media to set up in Beirut’s southern suburbs and publicly welcoming Houthi fighters to train with his forces. The Houthis’ political slogans, propaganda and modus operandi are all modeled after Hezbollah’s.

The Saudi government entered the war in Yemen with its open eyes. Having fought the Houthis back in 2009, it had no illusions that this would be a cakewalk. Nor did it expect to have an instant impact with “shock and awe” tactics, as a former U.S. ambassador to Yemen claimed. Saudi Arabia expected a messy, protracted, and expensive war, and that is what it has gotten.

The fact that Saudi Arabia intervened thus highlights the severity of the threat it faced once the Houthis had overthrown Yemen’s legitimate government and seized control of Sanaa. Had Iran been allowed to solidify its alliance with the Houthis unobstructed, Northern Yemen would have become another South Lebanon, with an Iranian proxy actively working to subvert Saudi national security. Saudi Arabia had two clearly defined military objectives in Yemen. The first was to disrupt arms deliveries, making it much more difficult and costly – or, ideally, impossible – for Iran to supply the Houthis.

The second was to send a clear message to the Houthis and their allies that an alliance with Iran would cost them dearly.

Saudi Arabia has achieved both objectives. Yemen’s airports have been closed down and its seaports blockaded. With Iran now struggling to smuggle arms into Yemen, the flow of weapons has declined considerably. Meanwhile, Saudi Arabia has maintained a powerful air campaign against the Houthis. The costs of their alliance with Iran could not be clearer.

But success in war never comes without sacrifice. And, unfortunately, Yemeni civilians have paid a high price, with an estimated 10,000 killed since the conflict began. For an air campaign waged for nearly two years against an unconventional army, this figure is not particularly high.

The losses pale in comparison to, say, Syria, where the air campaign being carried out by Russian, Iranian, and Syrian forces racks up 10,000 civilian deaths in a matter of weeks.

Moreover, claims that the Saudi coalition has intentionally targeted civilians – or infrastructure, for that matter – have not been substantiated by neutral parties. Anyone who has gained access to the battlefield has done so under Houthi oversight or control. And, in reality, it would not be in Saudi Arabia’s interest simply to destroy Yemen.

After all, Saudi Arabia will probably have to provide the lion’s share of aid to Yemen once the war is over and the rest of the world has turned its attention elsewhere.

Yet none of this diminishes the tragedy that these civilian casualties represent.

It is a truly horrific situation that highlights the urgency of defeating the Houthis and ending the conflict in Yemen. But it makes little sense to cast blame on Saudi Arabia, which entered the conflict not to project power, but to neutralize an acute security – even existential – threat.

Others may minimize the threats Saudi Arabia faces, but the kingdom’s rulers know better. They see what Iran has done to Lebanon, Syria and Iraq, and they hear what Iran and its allies say in their local media (never for Western consumption) about their hostile intentions toward the kingdom and its rulers.

If anything, Saudi Arabia has historically been willing to allow threats to reach a very high threshold – far higher than even a superpower like the United States would allow – before taking military action.

For its own self-protection, Saudi Arabia will have to ensure that its embargo on Iranian military assistance to the Houthis in Yemen remains in place. If, say, the United Nations agreed to shoulder that responsibility, the war in Yemen could be ended very quickly, protecting civilians from further casualties.

But if the world continues to deny Iran’s involvement in Yemen, and the threat that this poses to Saudi Arabia, the kingdom will have little choice but to remain in Yemen. Its own safety depends on it.