According to social-psychological research, feelings of uncertainty in decision-making evoke two opposite responses: (i) reduction of uncertainty by information search, leading to less stereotyping of people, and hence less discrimination; (ii) social identification with an ingroup, inducing more reliance on stereotypic perceptions and prejudices, and hence more discrimination against an outgroup. We integrate both responses in a microeconomic model of hiring and pay decisions by an employer. Increasing competition in the product market makes the employer feel more uncertain about his profits, but also raises the opportunity cost of screening expenditures. This elicits substitution of ingroup identification for screening expenditures, and hence enhances discrimination.