Increased diversity in the workforce can lead to either more or less discrimination. We study discrimination among recruits in the Norwegian Armed Forces during boot camp. In a vignette experiment female candidates are perceived as less suited to be squad leaders than their identical male counterparts. Adding positive information leads to higher evaluations of the candidates, but does not reduce the amount of discrimination. The boot camp provides an ideal setting for studying inter-group contact. We find that intense collaborative exposure to female colleagues reduces discriminatory attitudes: Male soldiers who were randomly assigned to share room and work in a squad with female soldiers during the recruit period do not discriminate in the vignette experiment.