Baghdadi was born in or near Samarra, Iraq and obtained graduate degrees in Islamic theology in the late 1990s and 2000s. He joined early Salafi-jihadi groups in Iraq following the US invasion in March 2003 and was detained with Al Qaeda commanders at the American Camp Bucca in 2004. He joined al-Qaeda in Iraq there and rose through the ranks until he was appointed emir—the highest leader—in 2010. Al-Qaeda in Iraq reorganized and renamed itself into Islamic State of Iraq during this time. In June 2014, the group permanently broke with al-Qaeda, renamed itself the "Islamic State", and declared itself a caliphate. Baghdadi was chosen caliph of ISIL by the Shura Council, who represented those members of the Islamic State qualified to elect a caliph.