How do foreign powers disengage from a conflict? We study this issue by examining the recent, large-scale security transition from international troops to local forces in the ongoing civil conflict in Afghanistan. We construct a new dataset that combines information on this transition process with declassified conflict outcomes and previously unreleased quarterly survey data of residents’ perceptions of local security. Our empirical design leverages the staggered roll-out of the transition, and employs a novel instrumental variables approach to estimate the impact. We find a significant, sharp, and timely decline of insurgent violence in the initial phase – the security transfer to Afghan forces; we find that this is followed by a significant surge in violence in the second phase – the actual physical withdrawal of foreign troops. We argue that this pattern is consistent with a signaling model, in which the insurgents reduce violence strategically to facilitate the foreign military withdrawal to capitalize on the reduced foreign military presence afterwards. Our findings clarify the destabilizing consequences of withdrawal in one of the costliest conflicts in modern history, and yield potentially actionable insights for designing future security transitions.