Admittedly my information comes from books, and may not be reliable
http://books.google.ca/books?id=3SapTk5 ... &q&f=false
Over the next fifty years, an increasing number of Europeans visited the city and left their impressions of its streets and people. Through their eyes we see a city graced by four minarets but starkly divided into two major quarters. Almost like two separate towns,with open space between and dividing walls,the Xamarweyn section was home for the merchant elites with trade ties to the wider world, to the Ethiopian highlands, and to Zanzibar. Shingaani,the other half of the town, was where the religious elite,the imam,and those connected to the sultan of Geledi in the interior lived. Europeans commented on the tremendous numbers of Arab dhows in the harbor, bringing sugar, molasses, dates, salt fish,and arms to the port in exchange for ivory,gums,and textiles. Mogadishu's factories produced futa benaadir, a locally woven cloth that they traded both to the interior and to the Red Sea. Custom demanded that strangers to the city should be “held” under the control of local mediators or brokers (abban), whose job it was to keep them safe and under control.
The city suffered a number of setbacks during the mid- nineteenth century. In 1835 there was a bad epidemic of plague and drought, producing a famine in the city; a terrible cholera epidemic killed many inhabitants in 1858. In the interior, uprisings of the Baardheere jamaaca (jihadists) disrupted Mogadishu's export ivory trade from 1836 to 1843, ruining many merchant families. Conflict inside the city over succession for the role of imam (1842–1843) required the intervention of the sultan of Geledi, who appeared outside the city with 8,000 warriors to mediate the conflict. To strengthen his claim of ultimate suzerainty over the city, Sultan Said of Zanzibar sent a governor to Mogadishu in 1843 who arrived to take control of the city with two soldiers.At that time,the city had around 5,000 inhabitants,including slaves.
Cities of the Middle East and North Africa: A Historical Encyclopedia - page 254
And the "The proceedings of the First International Congress of Somali Studies"
According to Guillain, the conflict in 1842-1843 involved the son of the deceased Imaam, one Axmed Maxamed, and the latter's nephew, one Axmed Maxmuud. In fact, the details of the relationship between these rival claimants require further clarification and conflict with the genealogy collected by Robecchi-Brichetti in 1891, but the basic facts are that the nephew, Axmed Maxmuud, sought recognition of his authority in Xamarweyn, where he apparently had relatives among the important Reer Sheekh Muumin, while Axmed Maxamed secured the support of the Imaam's traditional base in Shingaani.
While there is no record of armed struggle between the forces of the two Axmeds, their prolonged duel was apparently sufficiently disruptive to cause the intervention of the powerful Sultan of Geledi, Yusuuf Maxamed, who early in 1843 appeared with an army of some 8,000 warriors at the gates of Xamarweyn to act as mediator between the two parties. Christopher reports that although Sultan Yuusuf regarded the chief and people of Xamarweyn as his enemies and completely dominated the Shingaani imam, he decided not to enforce his will militarily for fear of a division within his own army, members of which had family ties with the people of Xamarweyn. Finally, later in that same year, Axmed Maxmuud seems to have succumbed to pressure from all parties, most likely led by Sultan Yusuuf, who was also his uncle, and agreed to withdraw to the interior.
Guillain claims that Axmed entrusted the leadership of Xamarweyn to his relative, Sheekh Muumin Xasan Cumar, head of the reer Sheekh Muumin, which had especially influential religious and commercial connections inland with Luuq through the settlement of Buur Hakaba, where the tomb of its namesake was an important regional centre of veneration. Indeed, Guillain's letter of introduction from Seyyid Said of Zanzibar "Cheikh Moumen-ben-Hhacen, Cheikh A'ounem-ben-Din-Nous, Cheikh Nous-ben-Din and all the elders of Hhameurouine" would seem to indicate his status as primus inter pares. In any case, the conflict between the two rivals to the title of imam had now expanded to become an intense rivalry between the two quarters of the city.