Modern electrophoresis techniques are often applied to investigate complex microbial communities. Analysis systems like GelCompare transform the optical pattern of the electrophoresis lanes into high-dimensional observation vectors and calculate measures of difference or similarity between pairs of lanes. Usually, these measures are applied in cluster analyses. Here, we apply permutation tests for the comparison of groups of lanes based on these pairwise measures together with some extensions for a combined analysis of several electrophoresis gels. The procedures are available as a computer program. An example is given for the comparison of bacterial soil communities, testing the effect of different crop plants. Each community was represented by amplified ribosomal gene fragments separated in a denaturing gradient gel.