The Baghdad government’s hopes of driving out the caliphate in Iraq's largest province suffer a heavy blow.