The invention describes a method for isolating one or more genetic
elements encoding a gene product having a desired activity, comprising of
the steps of: compartmentalizing genetic elements into microcapsules;
expressing the genetic elements to produce their respective gene products
within the microcapsules; sorting the genetic elements which produce the
gene product having a desired activity. The invention enables the in
vitro evolution of nucleic acids by repeated mutagenesis and iterative
applications of the method of the invention.