Somaliland formally opened a representative office in the Taiwanese capital, Taipei, on Wednesday 9 September, raising the hackles of both China and Somalia.
The move comes two weeks after Taiwan opened a similar office in Hargeisa, the capital of Somaliland - a country which declared independence in 1991 but is still only formally recognised by a handful of nations.
The growing relationship between Taiwan and Somaliland has riled Beijing and the Somalian government in Mogadishu.
Seven years after Somaliland - which includes the Red Sea coast right up to the border with Djibouti - declared independence it was followed by Puntland, an even more fragile entity at the tip of the Horn of Africa.
On 17 August Taipei opened a Taiwan Representative Office in Hargeisa, marking a change from the usual use of the name of the Republic of China, which rankles slightly less with Beijing.
Somalia's foreign ministry condemned Taiwan's "reckless attempts to infringe on the sovereignty of the Federal Republic of Somalia and violate its territorial integrity" and Chinese foreign ministry spokesperson Zhao Lijian echoed the remarks, accusing Taiwan of “undermining Somali sovereignty and territorial integrity.''
Mr Zhao said: “China firmly opposes Taiwan and Somaliland establishing an official agency or having any form of official exchanges.”
Somaliland’s representative to Taiwan, Mohamed Hagi, described it as a “very special relationship” and said: “We are members of the same community of democracies founded by our shared political and economic freedoms, as well as international values.”
Taiwan's Foreign Minister Joseph Wu said both were “proud of our sovereignty and ready to defend it.''
Somalia began to fall apart in 1991 when President Mohammed Siad Barre was ousted after more than 20 years in power.
Warlords from different Somali clans fought for control of Mogadishu while Somaliland - a former British colony - broke away, followed by Puntland.
The government of Somalia has spent the last few years trying to suppress an insurgency by the Islamist extremist al-Shabaab group and has been unable to re-exert its control over the north of Somalia.
Somaliland has managed to remain peaceful and has built a thriving economy.
Taiwan is officially recognised by only 15 nations - mainly in Latin America and the Pacific.
Since President Tsai Ing-wen came to power in 2016 he has been carving out an increasingly bold foreign policy, much to the chagrin of China.
Taiwan has been providing scholarships to students from Somaliland and has offered help with the country’s vital fishing industry.
The seas off the Horn of Africa are fertile fishing grounds and trawlers from as far away as China, Taiwan, Japan and South Korea to catch fish there.
The Horn of Africa is also of vital strategic interest to China, which has its only overseas military based in Djibouti, only a few miles from Camp Lemonnier, one of the US's largest overseas bases.
The Real Clear Defense website said the US had supported Taiwan's new relationship with Somaliland and suggested the US Navy might even send a ship to Hargeisa.