Some genes in prokaryotes consist of a mosaic of regions derived from different ancestors by horizontal gene transfer. A method is described for demonstrating the statistical significance of such mosaic structure and for locating the crossover points separating different regions.