The chalcone synthase (CHS) superfamily of type III polyketide synthases (PKSs) produces a variety of plant secondary metabolites with remarkable structural diversity and biological activities (e.g., chalcones, stilbenes, benzophenones, acrydones, phloroglucinols, resorcinols, pyrones, and chromones). Here we describe an octaketide-producing novel plant-specific type III PKS from aloe (Aloe arborescens) sharing 50-60% amino acid sequence identity with other plant CHS-superfamily enzymes. A recombinant enzyme expressed in Escherichia coli catalyzed seven successive decarboxylative condensations of malonyl-CoA to yield aromatic octaketides SEK4 and SEK4b, the longest polyketides known to be synthesized by the structurally simple type III PKS. Surprisingly, site-directed mutagenesis revealed that a single residue Gly207 (corresponding to the CHS's active site Thr197) determines the polyketide chain length and product specificity. Small-to-large substitutions (G207A, G207T, G207M, G207L, G207F, and G207W) resulted in loss of the octaketide-forming activity and concomitant formation of shorter chain length polyketides (from triketide to heptaketide) including a pentaketide chromone, 2,7-dihydroxy-5-methylchromone, and a hexaketide pyrone, 6-(2,4-dihydroxy-6-methylphenyl)-4-hydroxy-2-pyrone, depending on the size of the side chain. Notably, the functional diversity of the type III PKS was shown to evolve from simple steric modulation of the chemically inert single residue lining the active-site cavity accompanied by conservation of the Cys-His-Asn catalytic triad. This provided novel strategies for the engineered biosynthesis of pharmaceutically important plant polyketides.