Community-level selection is an important concept in evolutionary biology and has been predicted to arise in systems that are spatially structured. Here we develop an experimental model for spatially-structured bacterial communities based on coaggregating strains and test their relative fitness under a defined selection pressure. As selection we apply protozoan grazing in a defined, continuous culturing system. We demonstrate that a slow-growing bacterial strain Blastomonas natatoria 2.1, which forms coaggregates with Micrococcus luteus, can outcompete a fast-growing, closely related strain Blastomonas natatoria 2.8 under conditions of protozoan grazing. The competitive benefit provided by spatial structuring has implications for the evolution of natural bacterial communities in the environment.