Ethiopia will not withdraw its troops from Somalia in the wake of the deadly attacks in Kenya, the Prime Minister said Friday.

“There is no reason we are withdrawing at this time, we will fight al Shebab to the maximum possible,” Ethiopian Prime Minister Hailemariam Deslaegn told reporters.

Al Qaeda-linked Shebab extremists claimed responsibility for the attack in an upscale shopping centre in Nairobi last month that left at least 67 people dead.

Hailemariam said Shebab militants pose a threat to the region and that Ethiopia would support African Union (AU) and Somali troops in the country as long as the threat persists.

“Our security forces are also going to continue with their support to AMISOM and the Somali defence force and they will stay there until we are assured that al Shebab is not a threat to the region,” he said, referring to the AU mission in Somalia.

Ethiopian troops invaded Somalia in November 2011 to help support the country battle Shebab militants.

Hailemariam did not say how many Ethiopian troops are in Somalia, only that the number is “quite enough”.

In July, Ethiopia announced it was starting to pull its troops out of some parts of Somalia, where it has secured key towns.

Ethiopia is a key regional ally for conflict-wracked Somalia. In September, Ethiopia mediated negotiations between Somalia's federal government and the semi-autonomous state Jubaland, which was folded into the Somali federal system.

The 17,700-strong AMISOM force has clocked major successes against Shebab in recent months and controls parts of southern Somalia, including the capital Mogadishu and the key port city Kismayo.

However, key Shebab strongholds remain, including rural southern and central Somalia, while another faction has dug into remote and rugged mountains in the northern, semi-autonomous Puntland region.

Somalia has been ravaged by conflict since 1991 but a new UN-backed government took power last year, ending eight years of transitional rule by a corruption-riddled administration.