The United Nation Development Programme (UNDP) condemned the latest killing.
Mark Bowden, UN humanitarian co-ordinator for Somalia, paid tribute to his colleague on Al Jazeera and stated the importance of receiving continual support from the Somali community at this critical time, when the need for humanitarian assistance is rapidly increasing.
"Osman Ali Ahmed was a highly respected UNDP staff member who had performed his duties with great courage and commitment over the past 14 years," he said.
"The security for all humanitarian workers depends critically on the community itself, and, so far, Somali communities have really tried to protect humanitarian and aid workers.
"But at this stage what we really need is for them to re-double their efforts. Food price rises in Mogadishu ... and the prolonged drought make this a very critical period for humanitarian operations," Bowden said.
Ban Ki-moon, the UN secretary-general, led the world in condemning the killing as an "outrageous" act aimed at undermining humanitarian and peace efforts.
Ban, who is attending the G8 summit of industrialised nations in Japan, urged "all Somalis to reflect on this latest senseless act of violence and to work together in the search for peace and reconciliation".
"The killing of Osman Ali Ahmed is a loss not only for the United Nations, but also for the Somali people, who are the ultimate victims when humanitarian workers and aid officials are targeted in this way," Ban said in a statement issued by Michele Montas, his spokeswoman.
Aid workers targeted
Masteho Abubakr Yusus, Ahmed's wife, confirmed that her husband had died at the African Union hospital after being shot in the head.
The shooting occurred a day after an explosion killed a Somali official, his wife and four other people in Mogadishu.
Ahmed's killing is the latest in a string of attacks targeting humanitarian and foreign workers in Mogadishu.
On June 21, Hassan Mohamed Ali, head of the UN High Commissioner for Refugees in Mogadishu, was abducted from his home on the outskirts of the city.
UN officials have repeatedly appealled to the interim Somali government and armed groups opposed to it to spare aid workers, but they have been forced to scale down operations due to increased insecurity.
The African Union Mission to Somalia (Amisom) has deployed 2,600 peacekeepers in Somalia - well short of a promised 8,000 troops - and so far it has failed to stem the fighting.
At least 2.6 million Somalis are facing hunger due to acute food shortages caused by a prolonged drought, insecurity and high inflation. The UN's famine monitors have warned that the figure could hit 3.5 million by the end of the year.