President Museveni was declared winner by the electoral commission on February 21, minutes past 4 PM, east African time.
His closest rival, Dr Kizza Besigye managed 35.3 per cent of the votes cast.
Earlier, Dr Kizza Besigye’s party, the Forum for Democratic Change (FDC) rejected the results, saying they are a result of unacceptable fraud.
European Union and Commonwealth observers described the election process as anything but free and fair.
“I am pleased to congratulate you on your re-election by the people of Uganda,” partly read the letter from Villa Somalia, the state house in Mogadishu.
The congratulatory message was sent immediately after the Ugandan leader was declared winner.
“I very much hope that you will continue leading your country towards peace, unity and prosperity as well as Uganda keeping its role in Africa’s development and peace building,” the Somali leader added.
President Mohamoud also lauded Uganda’s democracy and praised the country for its role in efforts to stabilise Somalia.
“I thank you for Uganda’s role in the peacekeeping efforts under the auspices of the African Union Mission in Somalia (Amisom),” concluded the message by the Somali president.
Uganda was the first country to contribute forces to AMISOM in 2007. Since then other countries including Burundi, Djibouti, Kenya, Ethiopia and Sierra Leone followed its footsteps, raising the peacekeepers in Somalia to 22,000.