His rise to power has also been welcomed in other parts of the country.
Hundreds of Mogadishu residents sent messages of support, but others were less enthusiastic.
Those who opposed it said his election as the president of Somalia was likely to plunge the country into fresh violence.
After the results were announced on Monday night, sounds of gunfire could be heard in Mogadishu , but this is thought to have been celebrations rather than acrimonious gunfire.
Some of the people whom we met said they were hopeful that Hassan Sheikh would be able help the plight of many suffering people across the country:
"Well, I think it is very significant one (the election) and I believe it is [a] milestone for [the] Somali people in terms of marking a new chapter in Somalia which is a new era of transparent, peace and accountability, so I think it will really mark a significant history for Somalia".
"Well, as an ordinary Somali, I welcome the election of the new president. I believe that this move is a step taken forward despite the fact that a difficult task ahead of him like dealing with the Islamist insurgents".
The election of the new president was also welcomed in parts of the centre of the country.
However, the al-Qaeda linked group al-Shebab still controls many southern and central parts of the country, and are likely to cause considerable problems for the new president and government in the coming months.