Optimization of contributions of parents to progeny by minimizing the average coancestry of the progeny is an effective strategy for maintaining genetic diversity in ex situ conservation programs, but its application on the basis of molecular markers has the negative collateral effect of homogenizing the allelic frequencies at each locus. Because one of the objectives of a conservation program is to preserve the genetic composition of the original endangered population, we devised a method in which markers are used to maintain the allele frequency distribution at each locus as closely as possible to that of the native population. Contributions of parents were obtained so as to minimize changes in allele frequency for a set of molecular markers in a population of reduced size. We used computer simulations, under a range of scenarios, to assess the effectiveness of the method in comparison with methods in which contributions of minimum coancestry are sought, either making use of molecular markers or genealogical information. Our simulations indicated that the proposed method effectively maintained the original distribution of allele frequencies, particularly under strong linkage, and maintained acceptable levels of genetic diversity in the population. Nevertheless, contributions of minimum coancestry determined from pedigree information but ignoring the genealogy previous to the conservation program, was the most effective method for maintaining allelic frequencies in realistic situations.