A rhizosphere Gram-positive bacterial isolate, Paenibacillus sp. NAIST15-1, exhibits intriguing motility behavior on hard agar medium. Paenibacillus sp. shows increased transcription of flagellar genes and hyperflagellation when transferred from liquid to solid medium. Hyperflagellated cells form wandering colonies that are capable of moving around on the surface of medium containing Ն1.5% agar. Transposon mutagenesis was used to identify genes critical for motility. In addition to flagellar genes, this mutagenesis identified five nonflagellar structural genes that were important for motility. Of these, the disruption of degSU, wsfP, or PBN151_4312 resulted in a complete loss of flagellin synthesis. Analysis of flagellar gene promoter activity showed that each mutation severely reduced flagellar gene transcription in a different manner. Flagellar gene transcription was induced in liquid medium by the addition of a viscous agent, Ficoll, or by disruption of flagellar stator genes, indicating that flagellar gene transcription was induced in response to restriction of flagellar rotation. Overexpression of DegSU bypassed the requirement of flagellar rotation restriction for induction of flagellar genes. These results indicate that physical restriction of flagellar rotation by physical contact with the surface of solid medium induces flagellar gene transcription through the activation of DegSU. Further analysis revealed that the same mechanism was conserved in Bacillus subtilis. These results demonstrate that flagella act as mechanosensors to control flagellar transcription in Gram-positive bacteria.IMPORTANCE Many bacteria exist on living or nonliving surfaces in nature. Bacteria express distinct behaviors, such as surface motility and biofilm formation, to adapt to surfaces. However, it remains largely unknown how bacteria sense the surfaces on which they sit and how they induce the genes needed for growth on a surface. Swarming motility is flagellum-dependent motility on a surface. The Gram-positive bacterium Paenibacillus sp. exhibits strong swarming motility ability and is capable of moving on 1.5% agar medium. In this study, we showed that the two-component system DegSU was responsible for inducing flagellar genes in response to heavy loads on flagellar rotation in Paenibacillus sp. The same mechanism was conserved in a related species, B. subtilis, even though these two bacteria exhibit very different motility behaviors. This study shows that flagellum serves as a sensor for surface contact to induce flagellar gene transcription in these bacteria.KEYWORDS DegSU, Paenibacillus, flagellar rotation, surface sensing, swarming motility, wandering colony B acteria are capable of moving on a variety of surfaces. Swarming motility, which is defined as flagellum-dependent group motility on a solid surface, is observed in diverse bacteria (1-3). Swarming motility is distinct from swimming motility, which is flagellum-dependent movement of planktonic cells grown in an aqueous environment and requires differentia...