The bacterial flagellar motor is a sophisticated nanomachine embedded in the cell envelope and powered by an electrochemical gradient of H +, Na +, or K +across the cytoplasmic membrane. Here we describe a new member of the bacterial flagellar stator channel family (MotAB1 of Paenibacillus sp. TCA20 (TCA-MotAB1)) that is coupled to divalent cations (Ca 2+and Mg 2+). In the absence of divalent cations of alkaline earth metals, no swimming was observed in Paenibacillus sp. TCA20, which grows optimally in Ca 2+-rich environments. This pattern was confirmed by swimming assays of a stator-free Bacillus subtilis mutant expressing TCA-MotAB1. Both a stator-free and major Mg 2+uptake system-deleted B. subtilis mutant expressing TCA-MotAB1 complemented both growth and motility deficiency under low Mg 2+conditions and exhibited [Mg 2+] in identical to that of the wild-type. This is the first report of a flagellar motor that can use Ca 2+and Mg 2+as coupling ions. These findings will promote the understanding of the operating principles of flagellar motors and molecular mechanisms of ion selectivity.