Five studies examined the hypothesis that heterosexual men, but not heterosexual women, endorse negative attitudes toward homosexuality (i.e., sexual prejudice) in order to maintain a positive gender-related identity that is unambiguously different from a homosexual identity. Studies 1 and 2 showed that men's (but not women's) gender self-esteem (but not personal self-esteem) was positively related to sexual prejudice: The more positive heterosexual men's gender self-esteem, the more negative their attitude toward homosexuality. Studies 3 and 4 showed that this link appears specifically among men motivated to maintain psychological distance from gay men. Study 5 experimentally manipulated the perceived biological differences between homosexual and heterosexual men. The previously observed link between men's gender self-esteem and sexual prejudice appeared in the control and no-differences conditions but disappeared in the differences condition. These findings are discussed in terms of men's attitudes as a defensive function against threat to masculinity.