Somalia's President Hassan Sheikh Mohamud
Somalia's President Hassan Sheikh Mohamud warned of a Boko Haram, al-Shabaab alliance at a security conference in Germany getty images

Nigeria's Boko Haram terrorists have received training in Somalia before returning to their homeland, the Somalian leader has claimed. President Hassan Sheikh Mohamud made the comments during a security conference in Germany on 14 February.

"Without a stable Somalia, the whole region of the Horn of Africa will remain unstable and by and large, the African continent. There are proofs and evidence that [for] some time Boko Haram has been trained in Somalia and they went back to Nigeria," he said, according to Reuters.

Who are Boko Haram and al-Shabaab militants?

Boko Haram, which has renamed itself Iswap, fights against Western influence in Nigeria and aims to impose its version of Sharia law throughout occupied territories.

It carries out attacks in Nigeria and neighbouring countries in a bid to take control of more territory. Three Nigerian states − Adamawa, Borno and Yobe − have been under a state of emergency since May 2013.

The group has killed at least 20,000 people since 2009 and was deemed the world's deadliest terror group, surpassing its ally Islamic State (Isis) in November 2015. Nigeria has become the world's third most-terrorised country.

Al-Shabaab, which means, "The Youth," is a Somali terror group affiliated with al-Qaeda and Islamic State (Isis, Daesh).

An off-shoot of the Islamic Courts Union – a rival administration to the Transitional Federal Government in Somalia – Shabaab aims to overthrow the Somali government and impose its own version of Islam in the country.

It controlled Mogadishu and the southern region of Somalia from 2006 till 2011, when it was defeated by African Union peacekeepers.

The group often targets Kenya in retaliation for the Linda Nchi military operation, which saw the deployment of Kenyan troops to Somalia to drive out the militants in 2011.

He added Boko Haram was allied to the Somali Al-Shabaab terror group, which has killed thousands of people in the country and Kenya. "The terrorists are so linked together, they are associated and so organised, (that) we the world we need to be so organised," Mohamud continued.

It is not clear whether Boko Haram members still receive training in east Africa. Mohamud's comments came months after both Boko Haram and a Shaabab splinter group pledged allegiance to terror group the Islamic State (Isis, Daesh), which controls large swathes of Syria, Iraq and Libya.

Boko Haram and Shabaab are fighting to overthrow the current regimes in Nigeria and Somalia. Shaabab also carries out deadly attacks in Kenya in retaliation for the presence of Kenyan troops in Somalia, deployed to help the national army tackle terrorism.

In 2014, Boko Haram was deemed the world's deadliest terror group, after killing more than 20,000 people since 2009. The group is also renowned for kidnapping civilians – mainly women and children – and forcing them to carry out suicide bombing missions in crowded places such as markets, schools and mosques.

The Nigerian government claimed in December that the fight against the terrorists – who also carry out attacks in neighbouring Cameroon, Niger and Chad – had been "technically won". However, attacks blamed on the group both in northern Nigeria and Cameroon have claimed hundreds of lives in recent months.

In an interview with IBTimes UK, defence spokesperson Rabe Abubakar claimed that a regional offensive – consisting of 8,700 troops from Nigeria, Niger, Chad, Cameroon and Benin – had been successful and recent attacks were a "desperate attempt" by Boko Haram to grab media attention. Abubakar also urged the international community to step up its efforts to help Nigeria tackle terrorism in the region.

David Otto, chief executive of TGS Intelligence Consultants, told IBTimes UK that the link between Shabaab and Boko Haram "is nothing new". He said:"These groups are very good in sharing training, intelligence, militants and capability for their survival in such a volatile zone. Somalia is not alone as Boko Haram has received training, militants and weapons from Ansar Dine in Mali and also from Libya," Otto continued.

"Terrorists organisations seem to be more organised and collaborate very well than those regional states that counter them. Terrorism cannot be approached only from a state perspective - rather it is a problem that requires urgent and transparent regional and international collaboration especially now that everyone's beard is on fire."

Nigeria up close: Check out our Flipboard magazine