Relying on a natural experiment consisting in 130 competitions for promotion to associate and full professor in the Italian University, we analyze whether gender discrimination is affected by the gender of evaluators. Taking advantage of the random assignment of evaluators to each competition, we examine the probability of success of each candidate in relation to the committee gender composition, controlling for candidates’ scientific productivity and a number of individual characteristics. We find that female candidates are less likely to be promoted when the committee is composed exclusively by males, while the gender gap disappears when the candidates are evaluated by a mixed sex committee. Results are qualitatively similar across fields and type of competitions. The analysis of candidates’ decisions to withdraw from competition highlights that gender differences in preferences for competition play only a minor role in explaining gender discrimination. It also emerges that withdrawal decisions are not affected by the committee gender composition and therefore the gender discrimination is not related to self-fulfilling expectations.