Directed evolution of the C25 farnesylgeranyl diphosphate synthase of Aeropyrum pernix (Fgs) was carried out by error-prone PCR with an in vivo color complementation screen utilizing carotenoid biosynthetic pathway enzymes. Screening yielded 12 evolved clones with C20 geranylgeranyl diphosphate synthase activity which were isolated and characterized in order to understand better the chain elongation mechanism of this enzyme. Analysis of these mutants revealed three different mechanisms of product chain length specificity. Two mutants (A64T and A64V) have a single mutation at the 8th amino acid upstream of a conserved first aspartate-rich motif (FARM), which is involved in the mechanism for chain elongation reaction of all prenyl diphosphate synthases. One mutant (A135T) carries a single mutation at the 7th amino acid upstream of another conserved region (141GQ142), which was recently found to be another important region controlling chain elongation of a type III C20 geranylgeranyl diphosphate synthase and Escherichia coli C15 farnesyl diphosphate synthase. Finally, one mutant carrying four mutations (V84I, H88R, I177 M and M191V) is of interest. Molecular modeling, site-directed mutagenesis and in vitro assays of this mutant suggest that product chain-length distribution can be also controlled by a structural change provoked by a cooperative interaction of amino acids.