Numerous examples of biosynthetic gene clusters (BGCs), including for compounds of agricultural and medicinal importance, have now been discovered in plant genomes. However, little is known about how these complex traits are assembled and diversified. Here, we examine a large number of variants within and between species for a paradigm BGC (the thalianol cluster), which has evolved recently in a common ancestor of the Arabidopsis genus. Comparisons at the species level reveal differences in BGC organization and involvement of auxiliary genes, resulting in production of species-specific triterpenes. Within species, the thalianol cluster is primarily fixed, showing a low frequency of deleterious haplotypes. We further identify chromosomal inversion as a molecular mechanism that may shuffle more distant genes into the cluster, so enabling cluster compaction. Antagonistic natural selection pressures are likely involved in shaping the occurrence and maintenance of this BGC. Our work sheds light on the birth, life and death of complex genetic and metabolic traits in plants.