Martin Adler, an award-winning journalist, was killed yesterday when an unidentified gunman approached him from behind and shot him through the chest at close range, a reporter who witnessed the shooting said. Another Western journalist at the event was unhurt.
Channel 4, who had worked with Mr Adler in the past, described him as a "longtime friend". The network said that it was "deeply saddened" to hear of his death, but that he had not been working for them in Mogadishu.
Somalis had been protesting and demonstrating in support of an agreement reached on Thursday night in neighbouring Sudan that called for an immediate ceasefire and conferred recognition on the interim administration.
After the single gunshot rang out, participants at the rally fled in panic and the scene was littered with dozens of sandals. "The man was in a vehicle and came out to take video shots of some angry youths who were burning American and Ethiopian flags ... it was a single shot and within a second he was down," a witness said.
In February last year another unidentified gunman shot and killed a senior BBC journalist in Mogadishu. Kate Peyton, a BBC Africa producer, was accompanied by another BBC journalist who was not injured.
Yesterday's killing occurred a day after Somalia's largely powerless UN-backed government led by President Abdullahi Yusuf signed a tentative peace deal with a representative of the Islamic group controlling Mogadishu. This has calmed fears of a resurgence of fighting.
The two sides agreed on Thursday to end their military and propaganda campaigns, recognise each other and hold further peace talks in July in the Sudanese capital, Khartoum.
As The Independent's correspondent Kim Sengupta recently reported, Mogadishu has been all but destroyed by anti-aircraft artillery and mortars, leaving a landscape of densely packed but crumbling housing. The pulverising effect of concentrated firepower is all too obvious - homes have collapsed and solitary walls stick out like jagged teeth in front of rubble.
Thursday's surprising move towards peace was welcomed by diplomats worried about the worsening relationship between the Islamists, who seized Mogadishu from warlords on 5 June, and Somalia's weak but internationally recognised government.
"It's a step in the right direction - there was a real risk that the two sides were going to end up fighting," a Western specialist on Somalia said. "It's a sign of pragmatism on both sides - good will is stretching it a bit far."
President George Bush has previously declared he will not tolerate Somalia becoming a Taliban-style Afghanistan. Neighbouring states are pouring in money and arms. The UN and aid agencies are setting up emergency programmes.
After Baghdad, Mogadishu is now one of the most dangerous cities in the world. Assault rifles and pistols are commonplace and disputes are settled either through revenge attacks or through clan-based Islamic courts.
Since reports started to circulate in Mogadishu that the warlords who recently controlled the city were financed by the CIA to capture suspected al-Qa'ida members, anti-foreigner sentiment has boiled over. A number of Western journalists have been stoned or heckled while reporting on demonstrations.
Mr Adler is at least the tenth foreign journalist to have been killed in Somalia since 1991. In 2001, he received the Amnesty International Media Award.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies