Existing research has argued that terrorism is common in civil war because it is "effective." Surprisingly, however, only some groups use terrorism during civil wars, while many refrain altogether. We also see considerable variation in the use of terrorism over time. This article presents a theory of terrorism as a mobilization strategy in civil war, taking into account benefits, costs, and temporal dynamics. We argue that the choice and the timing of terrorism arise from the interaction between conditions for effective mobilization and battlefield dynamics. Terrorism can mobilize support when it provokes indiscriminate government repression or when it radicalizes rebels' constituency by antagonizing specific societal groups. The timing of attacks, however, is influenced by battlefield losses, which increase rebels' need to rally civilian support. The analyses of new disaggregated data on rebels' terrorist attacks during conflicts and of ISIS tactics in Iraq and Syria support our theoretical argument.