The clearest phenotypic characteristic of microbial cells is their shape, but we do not understand how cell shape affects the dense communities, known as biofilms, where many microbes live. Here, we use individual-based modeling to systematically vary cell shape and study its impact in simulated communities. We compete cells with different cell morphologies under a range of conditions and ask how shape affects the patterning and evolutionary fitness of cells within a community. Our models predict that cell shape will strongly influence the fate of a cell lineage: we describe a mechanism through which coccal (round) cells rise to the upper surface of a community, leading to a strong spatial structuring that can be critical for fitness. We test our predictions experimentally using strains of Escherichia coli that grow at a similar rate but differ in cell shape due to single amino acid changes in the actin homolog MreB. As predicted by our model, cell types strongly sort by shape, with round cells at the top of the colony and rod cells dominating the basal surface and edges. Our work suggests that cell morphology has a strong impact within microbial communities and may offer new ways to engineer the structure of synthetic communities.biofilms | cell morphology | biophysics | self-organization | synthetic biology S ingle-celled microorganisms such as bacteria display significant morphological diversity, ranging from the simple to the complex and exotic (1-3). Phylogenetic studies indicate that particular morphologies have evolved independently multiple times, suggesting that the myriad shapes of modern bacteria may be adaptations to particular environments (4-6). Microbes can also actively change their morphology in response to environmental stimuli, such as changes to nutrient levels or predation (7,8). However, understanding when and why particular cell shapes offer a competitive edge remains an unresolved question in microbiology.Previous studies have characterized selective pressures favoring particular shapes (7, 9-11): for example, highly viscous environments may select for the helical cell morphologies observed in spirochete bacteria (12). Thus far, these studies have predominantly focused on selective pressures acting at the level of the individual cell. However, many species live in dense, surfaceassociated communities known as biofilms, which are fundamental to the biology of microbes and how they affect us-playing major roles in the human microbiome, chronic diseases, antibiotic resistance, biofouling, and waste-water treatment (13-17). As a result, there has been an intensive effort in recent years to understand how the biofilm mode of growth affects microbes and their evolution (18, 19), but we know very little of the importance of cell shape for biofilm biology.In biofilms, microbial cells are often in close physical contact, making mechanical interactions between neighboring cells particularly significant. Recent studies have suggested that rodshaped cells can drive collective behaviors in microbial g...