In the early morning of Mar. 26, Saudi Arabia went to war against the Houthi rebels in Yemen. In doing so, Saudi leaders opened the latest chapter in a long history of meddling and influence over their southern neighbor.

Since Saudi Arabia was founded in the 1930s, its leaders have tried to keep a friendly regime in power in Yemen and to prevent it from posing a threat to Saudi interests. That often meant meddling in Yemen’s internal politics, keeping populist movements in check, using guest workers as leverage, buying off tribal leaders and occasional military interventions.

This time, the stakes are higher for both Saudi Arabia and Yemen. Saudi leaders say that, along with a coalition of nine other countries, they launched airstrikes and are blockading the Yemeni coast to drive back the Houthis and their allies in the Yemeni military, who have taken over much of the country in recent months. The Saudis and their Gulf Arab allies want to restore Yemeni President Abd-Rabbu Mansour Hadi to power.

The conflict in Yemen is complex, with a shifting set of alliances. Hadi and his supporters, who are mostly Sunni Muslims, are backed by Saudi Arabia and the Gulf states. The Houthis, who belong to a sect of Shi’ite Islam called Zaydis, are allies of Shi’ite-led Iran, the regional rival of Saudi Arabia and other Sunni Arab states. While the Saudis are quick to label the Houthis as Iranian proxies, it’s unclear how much support they receive from Tehran.

The Houthis are allied with former President Ali Abdullah Saleh, a longtime dictator who was ousted from power after the Arab uprisings of 2011 spread to Yemen. Once a Saudi ally, Saleh was replaced by Hadi in 2012 under a deal brokered by Riyadh. But Saleh still retains support among large segments of the Yemeni security forces and those troops helped the Houthis capture the capital, Sanaa, and move south toward Hadi’s stronghold of Aden.

With direct Saudi military intervention, Yemen has now been dragged into a regional proxy war between Iran and Saudi Arabia. This series of battles in Iraq, Syria, Lebanon, Yemen and Bahrain have defined the Middle East since the United States invaded Iraq in 2003. Over the past decade, the traditional centers of power in the Arab world — Egypt, Saudi Arabia and other Gulf states — grew nervous about the rising influence of Iran: its nuclear ambitions; its sway over the Iraqi government; its support for the militant groups Hezbollah and Hamas, and its alliance with Syria.

The proxy war is drawing in more regional actors. For example, Egypt’s security interests are not directly affected by Yemen, unlike Saudi Arabia and the other Gulf states. But Egypt’s military rulers are now highly dependent on funding from the Saudis and their Gulf allies. Hours after the start of the Saudi-led bombing campaign, Egyptian President Abdel Fattah el-Sisi said in a statement that Egypt’s navy and air force would soon join the fight, and that its army was ready to send ground troops to Yemen “if necessary.”

Both Iran and Saudi Arabia increasingly see their rivalry as a winner-take-all conflict: If the Shi’ite Hezbollah gains an upper hand in Lebanon, then the Sunnis of Lebanon — and by extension, their Saudi patrons — lose a round to Iran. If a Shi’ite-led government solidifies its control of Iraq, then Iran will have won another round. So the House of Saud rushes to shore up its allies in Yemen, Bahrain, Syria and wherever else it fears Iran’s influence.

****

Yemen’s geography and web of tribal, regional and sectarian alliances make it a difficult and costly for foreign invaders to exploit. Both Saudi Arabia and Egypt suffered significant losses during past military adventures there.

For centuries, Yemen was an autonomous province in the Ottoman Empire. With the empire’s collapse at the end of World War I, Yemen secured its independence as a kingdom in 1918 and its first ruler was Imam Yahya, head of the Zaydi sect. (The Zaydis have long been a minority in Yemen. Today they comprise about a third of the 24 million total population.) In the 1920s and 1930s, Yahya extended his rule over tribal lands across northern Yemen, which was then mostly inhabited by Sunnis.

But Yahya, who kept Yemen isolated and had virtually no outside allies, faced pressure from Saudi Arabia throughout his rule. In 1934, two years after Ibn Saud established the modern Kingdom of Saudi Arabia, he fought a short war against his southern neighbor. The Saudis seized the provinces of Asir and Najran from what Yahya and other Zaydis considered “historic Yemen.” That set the roots of a territorial dispute along the coast of the Red Sea and conflicts over border demarcation that would last until 2000.

Yahya and the Zaydis also skirmished in the south with the British, who had established a colony in the port city of Aden and its hinterlands since the 1830s. After Yahya died in 1948, his son and successor, Imam Ahmad, ended the kingdom’s isolation. He established diplomatic relations with the Soviet Union and China, hoping to secure military and development aid. This caused new tensions with the House of Saud, which feared communist influence at its southern border.

In the 1950s and early 1960s, the Arab world struggled to rid itself of the vestiges of colonial rule and hereditary monarchies. A group of Egyptian military officers, led by the charismatic Gamal Abdel Nasser, overthrew British-backed King Farouk in 1952, and kindled the hope of Arab unity. Nasser used his populist appeal, powerful military and rousing speeches (broadcast over the newly invented transistor radio in a popular program called Voice of the Arabs) to influence events in other Arab countries, including Yemen. But the Arab liberation movements would end in great disappointment — a politics of betrayal, exile and carnage.

When Yemen’s Ahmad died in September 1962, his son and successor, Imam Badr, was overthrown within a week in a coup led by army officers. Inspired by Egypt’s Nasser, the officers declared the Yemen Arab Republic. The royal family resisted the coup and sought support from the House of Saud, which did not want a successful military-led republican regime next door.

The Yemeni revolution quickly devolved into a civil war, and Yemen became the scene of a proxy battle between Egypt and Saudi Arabia — viewed by many as a struggle for the future of the Arab world, between the so-called “progressive” republican regimes and the “conservative” monarchies. Nasser decided to throw his weight behind the new military regime and flooded Yemen with Egyptian troops. At the end of 1963, there were 30,000 Egyptian soldiers in Yemen. By 1965, that number rose to nearly half of the Egyptian army — 70,000 troops.

The Egyptian army was bogged down fighting tribal guerrillas on their home terrain. Over the five-year war, more than 10,000 Egyptian troops were killed and the Egyptians failed to advance far beyond the capital city, Sanaa. Blinded by his fervor to promote revolution in the Arab world, the Yemen war became Nasser’s Vietnam.

At the same time, the Saudis were funding the royalist opposition, providing arms and hiring foreign mercenaries. But the Saudis did not make the same mistake as Nasser of committing thousands of their own troops to the fight. Nasser finally withdrew the last Egyptian forces from Yemen after the humiliating Arab defeat in the 1967 war with Israel.

When the civil war ended, northern Yemen remained a republic. The Saudis were not able to restore the monarchy, but Egypt had suffered such a defeat that it no longer had much sway over Yemeni politics. Around the same time, in the southern provinces that had been colonized by the British, a Marxist-ruled state was established in late 1967 with Aden as its capital. South Yemen — officially known as the People’s Democratic Republic of Yemen — soon became a Soviet satellite state.

In May 1990, after the collapse of the Soviet bloc, South Yemen united with northern Yemen (which had been ruled by Ali Abdullah Saleh since 1978) to form a single state, the Republic of Yemen. By that point, northern Yemen was heavily dependent on Saudi aid — which was intended to balance Soviet assistance to South Yemen — and remittances from several hundred thousand Yemenis working in the kingdom.

Saleh became president of the newly unified state, and he soon faced a severe test that would strain his relationship with the Saudis. Iraqi dictator Saddam Hussein invaded Kuwait in August 1990, prompting the United States to send hundreds of thousands of troops to protect Saudi Arabia. Saleh was allied with Hussein, who had the support of most Arab countries and Western powers during his eight-year war against Iran.

Saleh was reluctant to toe the Saudi line and cut off all relations with Iraq, which was an important trading partner and oil supplier for Yemen. At the time of the Kuwait crisis, Yemen also held the rotating Arab League seat on the United Nations Security Council. After Yemen voted against the Security Council resolution that authorized the use of force against Iraq, the United States and Saudi Arabia cut off all aid. The Saudis also expelled nearly 750,000 people — Yemeni workers and their families, some of whom had lived in the kingdom for decades. The expulsions cut off the majority of remittances and devastated Yemen’s economy.

The expulsions and their aftermath offer an instructive lesson for Saudi leaders who today are waging war against the Houthis, hoping to turn Yemenis against them. In 1991, Saudis hoped that Yemenis would blame Saleh’s government for instigating the expulsions and the subsequent economic collapse. But instead, Yemenis rallied around their leader, disdained the Saudis and expressed open admiration for Hussein.

In 1994, leaders of southern Yemen tried to secede after years of frustration with the north. A war broke out between the north and south, but Saleh’s forces defeated the southern rebels within a few weeks. The Saudis, still angry at Saleh for his no vote at the United Nations, had supported the southern rebels with arms and funding. But once again the Saudis backed the wrong side, and the Sanaa government reimposed unity by force.

Saleh’s relationship with the Saudis remained tense until the September 2001 terrorist attacks on the United States. At that point, Saleh maneuvered himself as an ally of both the Saudis and Washington in fighting al Qaeda. From 2004 until late 2009, Saleh’s government waged a series of six wars against the Houthi rebels based in the northern provinces of Yemen, near the Saudi border. The Saudis supported Saleh through all of these wars, and the Saudi military was directly drawn into the last of these conflicts in 2009. Saudi forces suffered about 200 casualties over several months of fighting.

Today, Saudi Arabia has intervened more directly in Yemen than in the past. In light of this history, the Saudis are reluctant to send ground troops to fight the Houthis on Yemeni soil. But recent conflicts — in Iraq, Syria and Libya — show that air power alone is not enough to win a decisive victory. And the longer this conflict drags on, the more likely that the Houthis will gain wide popular support as the defenders of Yemen’s independence against an aggressive and meddling neighbor.