Women remain a minority in politics. In nearly all countries, including parliamentary democracies, women are still underrepresented in national parliament and other representative institutions. Research has argued that there is a bias against women in elections. Here we study the process behind this phenomenon by investigating the effect of a candidate's gender and gender prototypicality on judgment of the suitability of this candidate in elections. The first experiment shows that when voters think topics that stereotypically demand male characteristics (e.g., competitiveness) are important, they prefer male candidates, while they prefer female candidates when topics that stereotypically demand female characteristics (e.g., pro-sociability) are important. Experiment 2 replicates this and shows that this effect is fully reversed for counterprototypical (i.e., in physical appearance) candidates. This supports a stereotyping as prediction account, and has important theoretical and practical implications. Copyright © 2008 John Wiley & Sons, Ltd.