We exploit random assignment of gender quotas across Indian village councils to investigate whether having a female chief councillor affects public opinion towards female leaders. Villagers who have never been required to have a female leader prefer male leaders and perceive hypothetical female leaders as less effective than their male counterparts, when stated performance is identical. Exposure to a female leader does not alter villagers’ taste preference for male leaders. However, it weakens stereotypes about gender roles in the public and domestic spheres and eliminates the negative bias in how female leaders’ effectiveness is perceived among male villagers. Female villagers exhibit less prior bias, but are also less likely to know about or participate in local politics; as a result, their attitudes are largely unaffected. Consistent with our experimental findings, villagers rate their women leaders as less effective when exposed to them for the first, but not second, time. These changes in attitude are electorally meaningful: after 10 years of the quota policy, women are more likely to stand for and win free seats in villages that have been continuously required to have a female chief councillor.