* Deadliest strike in capital so far this year
* Al Qaeda-linked rebels claim responsibility
* Ethiopia pulls troops from town, Shabaab walk in (Adds quotes from town under Shabaab control, analyst)
By Abdi Sheikh and Feisal Omar
MOGADISHU, March 18 (Reuters) - A suicide bomber who set out to assassinate a senior Somali security official blew up his car in central Mogadishu on Monday, missing his target but killing at least 10 people in the city's deadliest attack this year, police and rebels said.
Witnesses said the car bomb exploded near a vehicle carrying Mogadishu security chief Khalif Ahmed Ilig and other officers along the capital's busy Maka al Mukarram road.
But at the last minute, a minibus drove by, taking the force of the blast which left Ilig with only minor injuries, witnesses added.
Somalia's al Shabaab Islamist group claimed responsibility for the attempted assassination.
"It was revenge. He (Ilig) had been killing and arresting Mogadishu residents," al Shabaab spokesman Sheikh Ali Mohamud Rage told Reuters.
The al Qaeda-linked movement has kept up a campaign of guerrilla-style bombings and killings more than 18 months after it was forced out of its bases in the city by Somali and other African troops.
Monday's bomb was a stark reminder of two decades of civil strife in a war-torn country where the central government depends heavily on a 17,600-strong African Union peacekeeping force for its survival.
Bystanders helped pull the wounded from the burning minibus and teahouses along the route around 100 metres from the outer perimeter of the presidential palace.
Seven civilians, three government security officers and the bomber were killed, said police.
"Most of the people who died were on board the minibus - civilians. This public vehicle coincidentally came between the government car and the car bomb when it was hit. Littered at the scene are human hands and flesh," said senior police officer Abdiqadir Mohamud.
Last week, Mogadishu residents said government security forces had killed more than ten pardoned al Shabaab fighters, whose bodies were found dumped in the city's streets, their hands and legs bound.
The authorities have pledged to investigate those killings. They followed the murder of two senior security officials, which al Shabaab said it was responsible for.
The car bomb exploded a day after al Shabaab regained control of the southern city of Hudur after Ethiopian troops, who have been part of an African offensive against the militants, pulled out.
"We were shocked to see Ethiopian troops withdrawing from our town yesterday," mother-of-five Fatuma Nur told Reuters.
"Somali government troops and officials followed after them ... Al Shabaab fighters came in and the town is calm," she added.
It was not immediately clear why the Ethiopians, who have forces stationed in several towns, pulled back, handing the rebels a rare territorial gain after 18 months of losses.
There was no immediate comment from Addis Ababa.
One security analyst who declined to be named said the Ethiopians might be withdrawing to areas where they could secure their border at minimum cost. Hudur is the capital of Bakool province near the Ethiopian border.
Al Shabaab controlled much of Mogadishu between 2009 and 2011, during which time the capital's bombed-out streets were the frontline in a bloody battle between the rebels and African peacekeepers.
Civil war after the fall of dictator Mohamed Siad Barre in 1991 left Somalia without effective central government and awash with weapons. The turmoil opened the doors for piracy to flourish in the Gulf of Aden and deeper into the Indian Ocean. (Additional repoting by Richard Lough in Nairobi and Aaron Maasho in Addis Ababa; Writing by James Macharia and Richard Lough)