Are female politicians less likely to be promoted to specific ministerial posts, and is it important for them to toe the party line? This article focuses on whether the selection of ministers has a gender-specific dimension. Building on role congruity theory and research showing that female and male politicians are evaluated in a different manner in leadership positions, we present some original hypotheses. For example, we hypothesize that female politicians are less likely to be appointed to cabinet when they have held gender-incongruent committee positions in parliament. We also hypothesize that women are less likely to be appointed to cabinet posts when they have previously deviated from the party line. In an empirical analysis of Swedish ministerial appointments in six cabinets, we find that female politicians were less likely to be appointed to cabinet posts when they have held positions in ‘masculine’ parliamentary committees and when they deviated from the party line in their parliamentary speeches. These results suggest that women are more harshly judged when holding positions that are not in line with traditional gender stereotypes and have important implications for our understanding of gender and political leadership.