The Iraqi government once hoped to take Mosul by the end of 2016, but the campaign dragged on as Isis reinforced positions in inner-city neighbourhoods of the city's western half, carried out suicide car and motorbike bomb attacks, laid booby traps and kept up barrages of sniper and mortar fire.