section_path: Organisation and structure/Origins
section_name: Origins
paragraph_text: Origins
  
  Although it is unclear when al-Shabaab was formed, it is understood to have originated as a youth militia within the military wing of the Islamic Courts Union, an umbrella group which provided de facto governance in much of Somalia until the country was invaded by Ethiopia in December 2006. From 2007 to 2008, al-Shabaab established itself as an independent actor, gaining prominence as a vehicle of armed resistance against the Ethiopian military occupation. Many of its early leaders and members previously belonged not only to the Islamic Courts Union but also to the older al-Ittihad al-Islamiya, a group founded on the tenets of Salafism and opposition to clannism. Many early al-Shabaab leaders had also been trained as mujahideen in Afghanistan.