In vitro compartmentalisation in an emulsion was used to physically link proteins to the DNA that encodes them via microbeads. These microbeads can be selected for catalysis, or, as demonstrated here, for binding. Genes encoding a peptide containing an epitope (haemagglutinin) were enriched to near purity from a 10(6)-fold excess of genes encoding a different peptide by two rounds of selection using flow cytometry, indicating approximately 1000-fold enrichment per round. Single beads can be isolated using flow sorting and the single gene on the bead amplified by polymerase chain reaction. Hence, the entire process can be performed completely in vitro.