Sharmarke died when his vehicle hit an explosive device in the road on his way back from the funeral.
Sahal Abdulle, a Reuters journalist, next to Sharmarke at the time of the blast, was lightly injured in the head and face.
Pressure on journalists
Al Jazeera's Mohammed Adow, who knew both of the journalists, said: "Moments before Ali Imam was killed, he had told journalists about the movements silencing the Somali media who were talking about the poor conditions for Somali people today.
"Pressure has been mounting on Somali journalists. They have been victimised for not reporting on the issues of interest to certain groups.
|"The transitional government must take urgent steps to protect journalists and thoroughly investigate and punish these murders to prevent further killings" |
Reporters sans Frontieres
"This just shows how precarious Somali has become for journalists," he said.
The journalists' union in Somalia has expressed "outrage" at both killings, which they said were deliberate.
"The National Union of Somali Journalists is outraged by today's assassination of ... Ali Iman Sharmarke after a vehicle he was riding in was blown up by a remote-controlled mine by unknown assailants," it said in a statement.
Six media workers have been killed in Somalia so far this year, Paris-based Reporters sans Frontieres said on Saturday.
"The transitional government must take urgent steps to protect journalists and thoroughly investigate and punish these murders to prevent further killings," it said in a statement.
Meanwhile, a journalist with Shabelle, one of Mogadishu's main radio stations, who was arrested on Friday, was still in custody early Saturday, according to Jafar Kukay, the station's assistant director.
The journalist was detained during a raid by security forces, who ordered it off the air and detained seven members of staff.
Kukay had said that they had accused the radio station of putting out an inaccurate report on violence in Mogadishu the day before.
All the other employees have since been released and the radio has resumed its programming.
It is the third time since January that a radio station in Mogadishu has been raided by the authorities.
Somalia has experienced continued instability despite dozens of peace initiatives since the overthrow of Siad Barre, former president, in 1991.