How does ethnic stacking as a form of coup-proofing affect military loyalty during major anti-authoritarian protests? Drawing largely on case studies of the Arab Spring, much existing research argues that ethnic stacking generates in-group loyalty and out-group defection, leading stacked militaries to staunchly defend the regime while other armies step aside and allow revolutions to unfold. There is, however, much greater nuance in both ethnic stacking practices and the types of military loyalty shifts that regimes experience. Bringing together insights from the case study literature, we develop a theoretical framework of how the extent of ethnic stacking practices shapes military behavior. We then test this framework cross-nationally against African and Middle Eastern cases, from 1946-2015, using both descriptive data and machine learning-based predictive models. We find that only wholly ethnically stacked militaries, down to the rank-and-file soldiers in the streets, actually protect regimes from military defections. Ethnically stacking the officer corps, on the other hand, inclines militaries to fracture during civil resistance campaigns while unstacked militaries are the most likely to unify in allowing the regime to fall.