Flagellar motility, a mode of active motion shared by many prokaryotic species, is recognized as a key mechanism enabling population dispersal and resource acquisition in microbial communities living in marine, freshwater, and other liquid-replete habitats. By contrast, its role in variably hydrated habitats, where water dynamics result in fragmented aquatic habitats connected by micrometric films, is debated. Here, we quantify the spatial dynamics of Pseudomonas putida KT2440 and its nonflagellated isogenic mutant as affected by the hydration status of a rough porous surface using an experimental system that mimics aquatic habitats found in unsaturated soils. The flagellar motility of the model soil bacterium decreased sharply within a small range of water potential (0 to −2 kPa) and nearly ceased in liquid films of effective thickness smaller than 1.5 μm. However, bacteria could rapidly resume motility in response to periodic increases in hydration. We propose a biophysical model that captures key effects of hydration and liquid-film thickness on individual cell velocity and use a simple roughness network model to simulate colony expansion. Model predictions match experimental results reasonably well, highlighting the role of viscous and capillary pinning forces in hindering flagellar motility. Although flagellar motility seems to be restricted to a narrow range of very wet conditions, fitness gains conferred by fast surface colonization during transient favorable periods might offset the costs associated with flagella synthesis and explain the sustained presence of flagellated prokaryotes in partially saturated habitats such as soil surfaces.flagella | biophysics | liquid film | fitness | motility D ispersal is recognized as a key ecological process enabling populations' access to new sites and pools of resources (1), thereby affecting structure and productivity of ecosystems (2, 3). Active bacterial motion (motility) takes on many forms that require various appendages (4). If surface-associated modes of motility such as twitching, gliding, or swarming seem restricted to some species (5), the ability to swim by rotating one or more flagella is shared by a large diversity of prokaryotes. This swimming motility has attracted considerable attention, primarily aimed at resolving the biophysical functioning of flagella and to a lesser degree, exploring its adaptive value. In marine environments, a large fraction of bacterial populations are flagellated (6), and swimming motility is often coupled with chemotaxis, conferring a clear benefit to these cells by allowing them to outswim diffusion and exploit transient substrate gradients (7,8).In contrast to water-replete environments where flagellar motility is essentially unrestricted, there exists strong physical limitations to flagellar motility in partially saturated media where aquatic microhabitats are often fragmented and connected only by thin liquid films of bacterial size or smaller (9). The limitations to bacterial motility in thin liquid films have, thus, l...