For weeks, Somalia has been engaged in intense diplomatic efforts to rally international support after Israel recognised its breakaway region of Somaliland as an independent state. Through diplomatic outreach and high-level phone calls, Somalia's government has won the backing of many countries across Africa and the Middle East, rallying them to oppose the recognition. But one relationship has sharply deteriorated - Somalia's long-standing partnership with the United Arab Emirates (UAE).

For years, the oil-rich Gulf state has been viewed as a significant player in Somalia's security, economy, and politics, as the country has a coastline of more than 3,000km (1,864 miles) along the Gulf of Aden and the Indian Ocean - a strategic maritime region hit by piracy and weapon-smuggling that has contributed to instability in both Africa and the Middle East. The UAE cultivated multi-layered relationships with both Somalia's federal government and its regions and has been involved in port operations in Bosaso in Puntland and Kismayo in Jubaland, as well as Berbera in Somaliland.

But on Monday, Somalia's federal government announced the cancellation of all port management and security cooperation agreements with the UAE, accusing it of undermining the country's sovereignty. We had a good relationship with the UAE, but unfortunately, they didn't engage us as an independent and sovereign nation. After a careful assessment, we were forced to take the decision that we took, Somalia's President Hassan Sheikh Mohamud said in a televised address following an extraordinary cabinet meeting.

The UAE has not yet responded to his comments.

Omar Mahmoud, a senior researcher at the International Crisis Group think-tank, tells the BBC that Israel's recognition of Somaliland formed the backdrop to the decision. Somalia views this as an infringement of its territorial integrity and believes the UAE played a behind-the-scenes role in supporting the outcome, Mahmoud says.

In late December, Israel became the first country in the world to recognise Somaliland's independence. This led to huge celebrations in Somaliland's capital, Hargeisa, as Israel had given the territory the recognition it had yearned for since it seceded from Somalia more than 30 years ago, forming its own government and adopting its own passport and currency. In exchange, Somaliland said it would sign up to the 2020 Abraham Accords, which have so far seen the UAE, Bahrain, and Morocco establish full diplomatic relations with Israel, giving Prime Minister Benjamin Netanyahu's government a boost at a time it has faced a backlash over the war in Gaza.

The region is increasingly defined by divergent geopolitical blocs, with the UAE and Israel on one side, and Saudi Arabia, Turkey, and others on the other, Mahmoud says.

On Monday, The Middle East Eye news site reported that the diplomatic fallout has led to the UAE evacuating its security personnel and heavy military equipment from the airbase in Bosaso. Mahmoud points out that Somalia's relationship with the UAE has been steadily deteriorating since 2024, when Ethiopia - a major ally of the Gulf state in the Horn of Africa - signalled that it was prepared to recognise Somaliland's independence.

Somaliland reportedly saw this as a trade-off to establish a naval base along the breakaway state's coast. Somali suspicion of the UAE grew following Ethiopia's 2024 memorandum of understanding with Somaliland to swap sea access for recognition, as Somalia saw the UAE as potentially supporting an agreement it strongly opposed.

This is not the first time diplomatic relations between Somalia and the UAE have soured. In 2018, Somalia severed ties with the UAE, accusing it of interference in Somalia's internal affairs. At that time, the current president was in opposition, but has now adopted a sharply different position. Regional developments have created enough pressure for the government to act decisively, according to analysts.

However, with little control over key ports and regions, it remains unclear how effectively Somalia can enforce its new diplomatic stance against the UAE.