The level of women’s parliamentary representation often increases after armed conflict, but do voters in postwar societies actually prefer female electoral candidates? We answer this question by analyzing a unique data set containing information on nearly 7,000 candidates running in three elections with preferential voting in postwar Croatia. Our analysis demonstrates that voters’ gender bias is conditional on the local electorate’s ideology and exposure to war violence, with voters of right-wing parties and voters in areas more affected by war violence being more biased against female candidates. These effects of ideology and exposure to war violence also exhibit a strong interactive relationship, suggesting that bias against women is strongest among right-wing voters in areas exposed to war violence and reversed among left-wing voters in areas exposed to war violence. Our findings highlight the need to better understand the relationship between gender, ideology, and violence in postconflict societies.