In political science, several experiments studying the effect of gender on candidate choice have identified a general preference for women candidates in electoral contests. However, women’s representation in politics continues to lag behind men’s in almost every setting, including the most prestigious positions of political leadership. In real world settings, a disconnect remains between this seeming preference for women and the actual selection of women as political leaders. Using observational data at the party level, we show that even when women are candidates for leadership, a strong preference remains for male leaders. However, once selected, women leaders perform just as well as men, if not better, under similar political conditions. To understand the relationship between gender and leadership, we explore how competition for leadership posts impacts the legitimacy of leaders and investigate whether this a gendered process. We first establish substantive legitimacy as the idea that leaders are viewed as having earned their positions, are strong enough to lead the party, will work hard on behalf of the party, and will help the party win. Then we test, in an experimental design, how gender and competition work together to impact the evaluation of leaders. We first test for differences in legitimacy across genders related to outright gender bias. Then we test how gender and legitimacy are mediated through the competitiveness of intraparty elections. We hypothesize that while men may be perceived as more substantively legitimate overall, women that win highly competitive contests will be perceived as more legitimate than men, having proved they can win these types contests.