(From L) Tanzanian national Rashid Charles Mberesero, Osman Abdi Dagane, Sahal Diriye Hussein, Hassan Aden Hassan and Mohamed Ali Abdikar, the five men arrested in connection with the Garissa university massacre in April, stand during their trial in a courthouse in Nairobi on June 4, 2015. Picture: Stringer

Mogadishu - A US born Islamic insurgent, who is believed to be one of the masterminds behind a terror attack on a Kenyan university earlier this year, surrendered to the Somali military at the weekend, a senior official said on Monday.

Abdimalik Jones had recently defected from al-Shabaab to fighters backing Islamic State when he surrendered near the southern port town of Barawe in the Lower Shabelle region, the town's mayor, Hussein Mohamed Barre, told dpa by phone.

“We found him as he was hiding himself somewhere near Barawe after defected from al-Shabaab,” Barre said.

“Our troops ordered him to surrender and he did so.”

About 148 people, most of them students, were killed when al-Shabaab militants stormed the Garissa University campus in north-eastern Kenya in April.

Jones is due to be sent to Mogadishu for further investigation.

A group of former al-Shabaab members recently announced an allegiance to Islamic State.

The group are now under a crackdown from al-Shabaab's top commanders who remain loyal to al-Qaeda.