Britain's Foreign Secretary William Hague on Thursday opened a new embassy in Mogadishu after a 22-year absence, becoming the first EU nation to return to conflict-torn Somalia.
Hague raised the Union Jack flag over the new mission at Mogadishu's airport in a surprise visit with Somali President Hassan Sheikh Mohamud.
"It is testimony to the progress Somalia has made," Hague told reporters after opening the heavily fortified seaside embassy, a small collection of simple buildings surrounded by blast walls of canvas and wire blocks stuffed with sand.
The few countries that have an ambassador based in Somalia's anarchic capital Mogadishu include Ethiopia, Iran, Turkey and Yemen.
Several Western nations have ambassadors accredited to Somalia, but they are based in Nairobi, the capital of neighbouring Kenya, due to security concerns.
"I hope it sets an example to other nations," Hague added.
Hassan Sheikh Mohamud said the embassy opening was a "bold step".
"We are hoping and expecting that soon different flags will be flying in different parts of Mogadishu," he told reporters.
"It shows the world how we are now ... that Somalia is open for reconstruction and development."
The new embassy is nestled in sand dunes a short distance from the crashing blue waves of the Indian Ocean.
But it is also contained within the vast walled compound -- which also includes Mogadishu airport -- that hosts the headquarters of the 17,000 strong African Union force.
Hague spoke in front of the British flag that flew over the former embassy -- shut down in 1991 amidst the bloody chaos following the fall of dictator Mohamed Siad Barre.
The former embassy building was left badly damaged by years of fighting in the city between rival warlords, militia forces and Islamist insurgents, and the city is still deemed too dangerous for diplomats to travel around, except in armoured convoys.
The opening comes ahead of a major international conference on Somalia that is due to take place in London on May 7.
Britain closed its Mogadishu embassy and pulled out its ambassador and diplomatic staff in January 1991 as Somalia plunged into two decades of civil war.
Hague opened the "core office" of the new embassy from which British ambassador Matt Baugh and his staff will work while the rest of the embassy compound is completed, the Foreign Office said.
The embassy is due to be completed by the end of July. The site has been leased by the British government from Somalia.
Hague also discussed the London conference with the Somali president, who was elected by lawmakers just eight months ago, the Foreign Office said.
Somalia has been battered by conflict since 1991 but a new United Nations-backed government took power in September, ending more than a decade of transitional rule.
Many have said the new government offers the most serious hope for stability since 1991.
-- London conference --
The London conference, jointly hosted by British Prime Minister David Cameron and by the Somali president, will discuss how the international community can support its progress.
"I met President Hassan earlier today to discuss the conference, and also attended a discussion with representatives of civil society on preventing sexual violence," Hague said.
The Al-Qaeda-linked Shebab militant group have carried out a series of attacks in recent months, having been driven out of the capital in August 2011 by a regional military offensive.
In one of the bloodiest attacks, a suicide commando squad blasted its way into Mogadishu's main court complex on April 14, leaving 29 civilians dead.
Large parts of the country remain carved up between rival militias who pay little heed to the weak central government, while pirates operating from the Somali coast are still a problem for international shipping.
Britain, which once colonised the northern part of Somalia -- now the self-declared independent Somaliland -- also helped govern Somalia after its capture from colonial Italian forces in World War II.
Somalia won its independence in 1960.