The Algerian military’s response to the 2019–2020 Hirak protests was relatively peaceful. In contrast to its violent repression of protests in 1988, and subsequent coup and civil war in the 1990s, the military showed considerable restraint toward the Hirak. Leveraging a survey of 2,235 self-reported military personnel, I show that the military’s restraint emanated from protesters’ use of nonviolence and fraternization, as well as from a recognition that the military’s more repressive approach in the 1990s was a mistake. At the same time, a priming experiment suggests that the military’s willingness to repress increases when protesters threaten the military’s corporate interests, and when Russia, Algeria’s primary arms supplier, reiterates its support for the regime. Overall, the results show how protester tactics, international reactions, and political learning can condition the military’s repression or restraint during times of unrest.