The city of Sirte had been loyal to Muammar Gaddafi and suffered massive damage at the conclusion of the 2011 Civil War, later becoming home to militant Islamist groups like Ansar al-Sharia. ISIL formally announced their presence in Sirte in early 2015, driving a parade of vehicles through the city and declaring it part of their caliphate. Ansar al-Sharia split over how to respond, with most of their members joining ISIL. The group reportedly recruited many locals, former Gaddafi supporters alienated from the post-war political order in Libya, after they "repented" and pledged allegiance to al-Baghdadi. They were quickly able to take over much of the city. ISIL implemented their harsh interpretation of Sharia gradually, first focusing on building loyalty and allegiance from the tribal society of Sirte. In August 2015 Islamic codes of dress and behaviour began to be enforced more strongly and punishments like crucifixions and lashings began to be carried out. There was an uprising against ISIL in Sirte in the same month, with members of the Ferjani tribe, Salafists and former members of the security forces attacking ISIL forces. ISIL brought in reinforcements from outside of Sirte and the uprising was swiftly defeated, with media reports claiming dozens or hundreds of Sirte residents were killed after the fighting.