Genomic methods have transformed the study of bacterial evolution, adaptation and function by enabling the rapid characterization of virtually any microorganism and microbial community. Such analyses, however, are not without shortcomings: large genomic datasets often require new tools to uncover evolutionarily meaningful patterns; signatures of selection impart little, if any, information about their ecological causes, and most current assessments of microbiomes offer only limited understanding of community contents and functions. For more than two decades, research from my laboratory has combined informatic and experimental approaches to provide new insights into the evolution of microbial genes, genomes and communities. This proposal covers three main Subject Areas, and in each, many of the questions addressed stem from observations first made by comparative genomic analysis. The first Subject Area asks how new genes and functions originate in bacterial genomes. Most models of new gene evolution are based on the duplication and modification of existing genetic information, and ignore questions about how completely new genes can arise de novo. We also ask how those genes that already exist in genomes can assume entirely new functions. The second Subject Area investigates a newly discovered selective agent that governs bacterial genomic base composition. The long-held view is that differences in genomic base composition were caused by inherent biases in the patterns of mutations (a strictly neutral process). But recent comparative sequence analyses demonstrate that mutation in bacteria is universally biased towards A+T, even in GC-rich genomes, indicating a role of selection in shaping base composition. Why and how selection operates on the base composition is not known, and no known processes can explain its mode of action, so we are investigating the source of this newly discovered selective pressure, the mechanism by which it operates, and the extent of its action. The third Subject Area addresses questions about microbial communities, newly answerable due to novel methodologies. We examine the strain-level variation among bacteria in complex communities to answer questions about how specific host-restricted microorganisms co-evolve with hosts. At the other extreme of phylogenetic depth, we will classify the currently unclassifiable organisms that often represent large fractions of microbial communities. Our aim here is to discover new major lines of descent within the gut microbiome. Finally, we will work at the level of individual cells in complex microbial communities to elucidate how functionally relevant genes-globally importantly antibiotic resistance determinants-are distributed across divergent members of a community.