2-Hexyl-5-propylresorcinol is the predominant analog of several dialkylresorcinols produced by Pseudomonas aurantiaca (Pseudomonas fluorescens BL915). We isolated and characterized three biosynthetic genes that encode an acyl carrier protein, a β-ketoacyl-acyl carrier protein synthase III, and a protein of unknown function, all of which collectively allow heterologous production of 2-hexyl-5-propylresorcinol in Escherichia coli. Two regulatory genes exhibiting similarity to members of the AraC family of transcriptional regulators are also present in the identified gene cluster. Based on the deduced functions of the proteins encoded by the gene cluster and the observed incorporation of labeled carbons from octanoic acid into 2-hexyl-5-propylresorcinol, we propose that dialkylresorcinols are derived from medium-chain-length fatty acids by an unusual head-to-head condensation of β-ketoacyl thioester intermediates. Genomic evidence suggests that there is a similar pathway for the biosynthesis of the flexirubin-type pigments in certain bacteria belonging to the order Cytophagales.