By Abdi Sheikh

MOGADISHU (Reuters) - Turkey's swift response to Somalia's deadliest truck bombing drew praise from survivors and officials who called Ankara their "only genuine" international partner.

It is an implicit challenge to Western backers that spend billions on security but have not, in the view of many Somalis; jumped to help.

"Whenever there is a problem, Turkey helps us. Where are the other countries?" runs a popular cartoon circulating on Somali social media.

Within 48 hours of the huge twin explosions that hit Mogadishu on Saturday, a Turkish air ambulance had landed in the battle-scarred capital and picked up dozens of wounded Somalis to transport them to Turkey for free medical treatment.

Its health minister also pitched up with surgeons who set to work at once in hospitals alongside Somali doctors and nurses.

Ankara has invested heavily in Somalia over the past five years, with one eye on rich economic pickings should stability ever return and the other on burnishing President Tayyip Erdogan's image of Turkey as a global promoter of compassionate Islam.

"Turkey is the best friend to Somalia and they were the first supporter to us after the blast," said Abdiasis Ahmed, a jobless university graduate who said four friends had been airlifted out, one with a broken back.

At least 300 people were killed in the blasts and more than 400 injured. Although Islamist al Shabaab militants were pushed out of Mogadishu in 2011, Saturday's attack - which al Shabaab has not claimed - shows the dangers still facing the capital.

Many Somalis contrasted Ankara's response with that of the European Union, which has a naval force including combat ships equipped with emergency medical systems off Mogadishu's shore to deter piracy, but which did not take in casualties.

"I've heard a lot of complaints from Somalis saying 'There's a huge Western navy on our shores - why can't those people come to help us?'," said Rashid Abdi, a Nairobi-based Somalia analyst at International Crisis Group, a think-tank.

A spokesman from the naval force said the force had diverted its nearest vessel, a Spanish ship, that delivered equipment and medical supplies once it reached the Somali coastline. He said the maritime area the force covers is "vast" but the ship arrived Mogadishu "as quickly as possible."

A tweet from the naval force earlier on Wednesday said it was providing "vital medical aid" for the victims.

Senior officials also compared the speed and scale of Turkey's assistance with that of Somalia's foreign partners, including neighbors Kenya and Djibouti and the United States and the United Nations.

Mogadishu mayor Thabit Mohamed tweeted on Monday that he was grateful for Turkey's "immediate response" and "relief for victims", compared with a "Thanks for standing with #Mogadishu" tweet 24 hours later aimed at the U.S. Embassy.

"Turkey is always first to help us. They are our only genuine brother," Information minister Abdirahman Omar Osman told Reuters, recalling a personal visit by Erdogan in 2011, when Somalia was in the grip of famine.

"Their support is visible to everyone. They build hospitals, they build schools, and that's why they are different than others," he said. "Others might give more money but Turkey is perceived by the people to be the ones really helping Somalia."

(Additional reporting by Maggie Fick; Writing by Maggie Fick; Editing by Ed Cropley/Alison Williams/Jeremy Gaunt)