When animals are selected for one specific allele, for example for inclusion in a gene bank, this may result in the loss of diversity in other parts of the genome. The aim of this study was to quantify the risk of losing diversity across the genome when targeting a single allele for conservation when storing animals in a gene bank. From a small Holstein population, genotyped for 54 001 SNP loci, animals were prioritized for a single allele while maximizing the genomewide diversity using optimal contribution selection. Selection for a single allele was done for five different target frequencies: (i) no restriction on a target frequency; (ii) target frequency = original frequency in population; (iii) target frequency = 0.50; (iv) target frequency of the major allele = 1 (fixation); and (v) target frequency of the major allele = 0 (elimination). To do this, optimal contribution selection was extended with an extra constraint on the allele frequency of the target SNP marker. Results showed that elimination or fixation of alleles can result in substantial losses in genetic diversity around the targeted locus and also across the rest of the genome, depending on the allele frequency and the target frequency. It was concluded that losses of genetic diversity around the target allele are the largest when the target frequency is very different from the current allele frequency.