How do citizens balance their preferences for civil liberties and security in the context of a competitive party system? Using the case of terrorism and counter-terrorism, I argue that the willingness to support restrictions of civil liberties does not only depend on external shocks and being targeted by a counter-policy. Instead, it also depends on their ideological match with policymakers and terrorist actors. Using an original survey experiment conducted in Germany in 2022, I study how the four factors feeling threatened by a terrorist attack, being targeted by a surveillance measure, the ideology behind an attack, and the partisanship of counteracting politicians influence the attitudes of citizens and whether these factors are mutually dependent. While earlier research has focused on one kind of terrorism (mostly Islamic), this paper examines various forms of terrorism (religious, right-wing, and climate-radical) and how they affect peoples' attitudes toward civil liberties and surveillance. The results show that terrorist ideology plays a minor role, but that it matters whether citizens sympathize with the party that proposes a policy. The study extends our understanding of the political consequences of polarization, threat perceptions of terrorism, and public support for surveillance policies.