Battle for Islamic State’s final enclave ‘as good as over’