Shebab Islamists claimed they carried out a suicide car bomb attack on a Turkish embassy annex in Mogadishu Saturday, killing a Turkish guard and a Somali bystander, witnesses and officials said.
"One of our policemen from the special forces tasked with protecting the embassy annex targeted in the attack has unfortunately died," the Turkish foreign ministry said in a statement.
Three other Turkish security forces were wounded, one of them seriously, in the attack, one of the worst against the Turkish presence in Mogadishu, it said.
A Somali witness told AFP that an explosives-laden vehicle rammed the gates of a building housing embassy staff and exploded, also killing what he described as a passer-by.
The Shebab claimed the attack on their twitter feed, saying their forces "have just carried out an operation targeting a group of Turkish diplomats."
"The Turkish are part of a group of nations bolstering the apostate regime and attempting to suppress the establishment of Islamic sharia," the Islamists said.
A diplomat in Istanbul said Turkish guards were able to kill two attackers before a third detonated his vehicle.
The wounded "policemen have been taken to a hospital in Mogadishu. We are sending a medically equipped plane to repatriate them," the diplomat told AFP.
"Turkey is very active in Somalia and when you are very active you become a target quite easily," he said.
Turkey in 2011 launched a major diplomatic, economic and humanitarian push in war-torn Somalia, one of the very few nations to set up an embassy in the capital.
It was opened following a visit in August by Turkish Prime Minister Recep Tayyip Erdogan, the second major leader to visit post-civil war Mogadishu, a few months after Uganda's Yoweri Museveni.
Direct flights between Somalia and Turkey started in March 2012. Turkey has helped build hospitals and renovate other buildings in the capital.
Al Qaeda-linked Shebab insurgents have carried out a series of bombings, attacks and killings in a bid to overthrow the internationally-backed government.
A separate car bomb on Saturday morning that targeted a Somali government vehicle left one person dead.
On July 12, just a couple of days into the Muslim holy month of Ramadan, Somali insurgents killed at least five people in multiple attacks in the capital, with a suicide bomber ramming an African Union convoy while later a grenade was thrown into a hotel.
Shebab fighters claimed members of their suicide brigade carried out the attack, calling it "a martyrdom operation targeting a convoy of crusaders".
Ramadan often sees a surge in Shebab attacks, with gunmen urged on by extremist preachers.
The AU mission confirmed a car packed with explosives "attempted to hit" one of their armoured troop transport vehicles along one of Mogadishu's main central highways, but that none of its troops were killed in the blast.
Later the same day unknown insurgents hurled a grenade into the Barwaqo hotel in central Mogadishu, killing two people and wounding at least 10.
In mid-June Shebab insurgents killed nine people as they shot and blasted their way in broad daylight into the fortified UN compound in Mogadishu, the most serious attack on the United Nations there in recent years.
The UN compound attack used similar tactics to those employed in April, when a nine-man suicide commando unit blasted its way into Mogadishu's main court complex, killing 34 people.
Key Shebab strongholds remaining include rural southern and central Somalia, while another faction has dug into remote and rugged mountains in the northern, semi-autonomous Puntland region.