This paper uses economic experiments to investigate how gender discrimination depends on the social identities of interacting parties. We randomly matched students pursuing bachelor-equivalent degrees in different institution types that represent distinct identities within Pakistani society. Our main finding is that gender discrimination is not uniform and varies as a function of the social identity of the matched individuals. While men of higher socioeconomic status (SES) exhibit no gender discrimination, men of lower SES and higher religiosity discriminate against women but only women with lower SES who are closest to them in social distance. This discrimination is largely taste based.