19In bacterial functionally related genes comprising metabolic pathways and protein complexes are 20 frequently encoded in operons and are widely conserved across phylogenetically diverse species. The 21 evolution of these operon-encoded processes is affected by diverse mechanisms such gene duplication, 22 loss, rearrangement, and horizontal transfer. These mechanisms can result in functional diversification 23 of gene-families, increasing the potential evolution of novel biological pathways, and serves to adapt 24 evolutionary relationships of operon encoded genes and the evolution of operon organization as a 49 whole. To address this challenge, we present a novel method to study operon evolution by integrating 50 phylogenetic tree based clustering and genomic-context networks. We apply this approach to perform 51 the first systematic survey of all known synthase dependent bacterial biofilm machineries, 52 demonstrating the generalizability of our approach for operons of diverse size, protein family 53 composition, and species distribution. Our approach is able to identify distinct biofilm operon clades 54 across phylogenetically diverse bacteria, resulting from gene rearrangement, duplication, loss, fusion, 55 and horizontal gene transfer. We also elucidate different evolutionary trajectories of Gram-negative and 56Gram-positive biofilm production machineries, and in a companion paper (BIORXIV/2019/768473) 57 present the experimental validation of a novel mode of biofilm production in a subset of Gram-positive 58 bacteria. 59 60