BEIRUT (Reuters) - The battle for the western Yemeni port of Hodeidah could be an important milestone in the three-year civil war. But analysts say the conflict is so complex that even a decisive outcome there might not bring peace.

Why is Yemen so divided?

Yemen’s internal splits have festered for years. North and south Yemen united into a single state in 1990, but separatists in the south tried to secede from the pro-union north in 1994.

Their forces were swiftly beaten, and more power and resources flowed to the northern capital of Sanaa, angering many southerners.

Former president Ali Abdullah Saleh had ruled north Yemen since 1978 and the unified state after 1990. But he alienated many Yemenis. His relatives controlled core parts of the army and economy, and critics said corruption was rife.

In the far north, some of the Zaydi sect of Shi’ite Islam also chafed. Zaydis had ruled northern Yemen until the 1962 revolution, but their heartland was now impoverished. In the late 1990s, some Zaydis formed the Houthi group, which fought Yemen’s army and grew friendly with Iran.

Though allied to Saleh, the Muslim Brotherhood and other Sunni Islamists were also gaining strength, particularly under General Ali Mohsen al-Ahmar, who built a power base in the army.

Taking advantage of factional rivalries, jihadist fugitives set up al Qaeda in the Arabian Peninsula (AQAP), one of the group’s most powerful wings, and began staging attacks.

How did ‘Arab Spring’ protests lead to war?

Anti-government protesters shout slogans during a rally to demand the ouster of Yemen's President Ali Abdullah Saleh in Sanaa July 24, 2011. REUTERS/Khaled Abdullah

When mass protests broke out in 2011, some of Saleh’s former allies turned on him. The army split between units loyal to Saleh and those who followed Ahmar. Separatists rallied in the south. The Houthis seized more areas. AQAP attacks increased.

After a year of crisis, including a bombing that nearly killed Saleh, Yemen’s Gulf neighbors persuaded him to step down, but he stayed in Yemen.

Deputy president Abd-Rabbu Mansour Hadi was elected in 2012 to a two-year term to oversee a democratic transition. A “National Dialogue” meeting of all Yemen’s opposing groups began hashing out a new constitution.

But despite the dialogue, things were falling apart.

Hadi was widely seen as weak and his administration corrupt. Saleh’s allies in the army and government undermined the transition. AQAP set up a mini-state and hit Sanaa with ever bloodier bombings.

In 2014, the Houthis seized Sanaa with help from army units loyal to Saleh, forcing Hadi to share power. When the National Dialogue proposed a federal constitution, both Houthis and southern separatists rejected it for blunting their new-found sway.

Slideshow ( 3 images )

The Houthis arrested Hadi in early 2015, but he escaped and fled to Aden. The Houthis pursued him, battling loyalists of the transitional government.

Days later, Saudi Arabia entered the war on Hadi’s side, backed by a coalition of Arab allies, to prevent Iran from gaining influence via the Houthis on its border and to preserve the Gulf-brokered transition.

They plucked Hadi from Aden and took him to Riyadh, notionally preserving his internationally recognized government and the democratic transition plan.

Why was there deadlock for so long?

The crisis was now a war between two unstable coalitions.

The Houthis and Saleh were old enemies jointly ruling the populous highlands and Red Sea coast.

Read More: Yemen in conflict

Hadi had no personal power base, but became a nominal figurehead for southern separatists, tribes in the northeast, Sunni Islamists and army remnants loyal to Ahmar.

Internal rivalries even emerged in the coalition set up by Saudi Arabia to back Hadi. Riyadh and its main ally, the United Arab Emirates, differed over local allies and tactics.

The Houthis and Saleh’s forces were driven from Aden and its environs in south Yemen, and from central Marib and the desert area to its east in 2015. Years of military stalemate followed.

The Houthis held most of the easily defended highlands. They also held the flat Red Sea coast and its port of Hodeidah - the last entry point for supplying northern Yemen.

The coalition kept up intense air strikes, aiming to split the Houthis and Saleh. They imposed a partial blockade to stop Iran arming the Houthis, something it denies doing. But despite this pressure, U.N.-backed talks went nowhere.

How have internal divisions played out?

Then, last year Saleh finally abandoned his Houthi allies, hoping to cut a deal and regain power for his family. But he was killed fleeing Sanaa in December, 2017.

His loyalists turned on the Houthis, helping the advance toward Hodeidah that culminated in this week’s assault.

Divisions widened on the other side too. The UAE supported separatists in the south who sometimes clashed with fighters backed by Saudi Arabia.

In the north, the Saudis brought in Ahmar to command forces around Marib - a red flag for the UAE because of his connection to the Muslim Brotherhood, its biggest bugbear.

Read More: Arab forces seize entrance to airport in Yemen's main port city

Meanwhile, the death toll from air strikes and the near famine aggravated by the partial blockade prompted international outrage, making it harder for Gulf states’ key Western allies to maintain military aid.

If the Hodeidah fighting lasts long, causing big coalition casualties and an outcry over a humanitarian catastrophe, the Houthis may hope the advance will fail.

If the Houthis are driven out and lose all ability to keep supply lines open, they might lose the war. But there is no guarantee the victors could put aside their own divisions and build a real peace.