FliM is one of three proteins (FliG, FliN, FliM) that forms the rotor-mounted switch complex (C ring), located at the base of the basal body. This complex interacts with the CheY and CheX chemotaxis proteins, in addition to contacting components of the motor that determine the direction of flagellar rotation (By similarity). Interacts (via N-terminus) with unphosphorylated CheY. Interacts (via central domain) with FliG (via central domain or via central domain and C-terminus). Belongs to the FliM family.