ISIL took full control of the city in mid-May, in what was Baghdad’s most stinging defeat since it launched a counter-offensive to regain large regions captured by the extremists in the summer of 2014.