The literature documenting the effect of electoral gender quotas on policy is extensive, and yet its potential mechanisms remain under-explored. In this paper, we examine the relative importance of differential preference of women leaders (supply) vis-a-vis greater demand expressed by women voters in the presence of female leadership in explaining the gender quota effect. We compile data on household level allocation of a politically salient good—toilets—for the entire rural population (over 25 million households) of Uttar Pradesh, the largest state of India. We argue and show that women exhibit a greater preference for toilets than men and this gender gap is significantly larger for Muslims than Hindus. Additionally, women in female headed households, relative to male headed ones, are more likely to express greater demand. We use the religious and gender identities of council presidents and household heads as proxies for toilet preference to disentangle demand and supply effects. Using a fuzzy regression discontinuity design, we find that gender quota among Muslim leaders has a large and statistically significant positive effect on toilet provision, while for Hindu leaders it doesn’t have any average effect. Hindu female leaders, however, allocate disproportionately more toilets to Muslim female headed households. We establish that greater demand expressed by households explains most of the heterogeneous effects of gender quota across Hindu and Muslim Sarpanches, while we do not find any evidence of the supply mechanism. Our results have important policy implications and can reconcile the mixed evidence on the effects of gender quotas in elections.