FliM is one of 2 proteins (FliG, FliN) that might form a switch complex that is proposed to be located at the base of the basal body. This complex interacts with the CheY and CheZ chemotaxis proteins, in addition to contacting components of the motor that determine the direction of flagellar rotation (Potential). Belongs to the FliN/MopA/SpaO family.