But now new housing estates are being built amid an economic boom as diaspora Somalis return and newly wealthy businessmen capitalise on the relative peace in the city.
Some seven kilometres outside Mogadishu in a formerly largely rural area, new homes are springing up, with almost 50 houses now ready on an estate, builders say.
Mohamed Abdullahi Ali, from Salaam Somali Bank, said it was a “great honour” to back the estimated $20m project.
Construction began in early 2015 and the project was touted as offering commercial returns and helping rebuild the nation.
“It is a new neighbourhood for all Somalis to buy affordable homes, by leaving the densely populated neighbourhoods of Mogadishu, and to come and stay with families here,” Mr Ali said.
“According to our plan, we are going to build 500 homes that can cover the residential needs for 500 families in the first stage, and then will construct more houses.” Tens of thousands forced to flee their homes still live in plastic and rag shelters in the capital, sometimes in the ruins of war-shattered buildings, and more than a million people are still in need of emergency aid in a country ravaged by famine in 2011, the United Nations says.
Car bombs and assassinations are still common, and a 22,000-strong African Union force fights alongside the army to protect the internationally-backed government from attacks by the Islamist Shebab insurgents.
The streets in the new estate offer a very different vision of Mogadishu.
Those returning to Somalia — including investors wanting to start new business in the their homeland — say the Daru Salaam estate offers them a more secure place to live.
“I came back to this city to buy a new home in Daru Salaam neighbourhood… the houses are well built,” said Abdiqadar Jimale Roble, 34, who grew up in Sweden from the age of 12 after Somalia spiralled into civil war in the early 1990s.
“I have been out of Somalia for long time but I came back because everybody needs his country — and the country is making much progress,” Mr Roble added. “I had to take part in that progress, and everybody should have a house in his country.” For those returning with dollars earned abroad, the estate reflects the possible profits to be made even in a still dangerous country.
Sadia Sheikh Ahmed, who also grew up in Sweden after fleeing Somalia, said she had helped her relatives abroad snap up property.
“Initially we wanted to buy two houses, but now we and our relatives have bought eight homes, scheduled to be completed soon,” she said.
A two-storey house can cost some $130,000, while a more simple bungalow comes in at around $70,000.
Those are hefty sums in one of the poorest countries in the world, with a gross domestic product per capita of just $284, according to the World Bank, against a sub-Saharan Africa average of $1,300.
Development indicators are “among the lowest in the world”, the World Bank says, noting the Horn of Africa nation is “heavily dependent” on aid and remittances.
Over 308,000 children are acutely malnourished, according to the UN Office for the Coordination of Humanitarian Affairs (OCHA).
“After more than two decades of violence and political instability, Somalia is on a positive trajectory,” OCHA said, while warning the “promising trend” takes place amid a “precarious” humanitarian and security situation.
“Humanitarian needs remain vast and Somalia’s humanitarian crisis remains among the largest and most complex in the world,” OCHA added.
But the estate is symbolic of the possible changes in Mogadishu.
“The security here is very good and there have been no problems,” said Fuad Ahmed Warsame, marketing director of Daru Salaam Real Estate, which is building the new neighbourhood — meaning “house of peace.” The company is headquartered in central Mogadishu’s famous Bakara Market, the city’s commercial heart, once infamous as the 1993 battle when fighters shot down two American Black Hawk helicopters. The bullet scars there have long been covered up with business booming.
“Our plan is to build a new neighbourhood with a good environment, new designs,” added Mr Warsame.