We describe a dominant behavioral marker, rol-6(su-1006), and an efficient microinjection procedure which facilitate the recovery of Caenorhabditis elegans transformants. We use these tools to study the mechanism of C.elegans DNA transformation. By injecting mixtures of genetically marked DNA molecules, we show that large extrachromosomal arrays assemble directly from the injected molecules and that homologous recombination drives array assembly. Appropriately placed double-strand breaks stimulated homologous recombination during array formation. Our data indicate that the size of the assembled transgenic structures determines whether or not they will be maintained extrachromosomally or lost. We show that low copy number extrachromosomal transformation can be achieved by adjusting the relative concentration of DNA molecules in the injection mixture. Integration of the injected DNA, though relatively rare, was reproducibly achieved when single-stranded oligonucleotide was co-injected with the double-stranded DNA.