FliK–FlhB interaction switches export specificity of the bacterial flagellar protein export apparatus to stop hook protein export at an appropriate timing for hook length control. The hook structure is required for the productive FliK–FlhB interaction to flip the switch but it remains unknown how it works. Here, we characterize the role of FliK in the switching probability in the absence of the hook. When RflH/Flk was missing in the hook mutants, the switching occurred at a low probability. Overproduction of FliK significantly increased the switching probability although not at the wild-type level. An in-frame deletion of residues 129 through 159 of FliK weakened the interaction with the hook protein but not with the hook-capping protein, producing polyhooks with filaments attached. We suggest that temporary association of FliK with the inner surface of the hook during FliK secretion results in a pause in the secretion process to allow the C-terminal switch domain of FliK to be positioned and appropriately oriented near FlhB for catalysing the switch and that RflH/Flk interferes with premature switch by preventing access of cytoplasmic FliK to FlhB and even that of FliK during its secretion until hook length reaches 55 nm; only then FliKC passes the RflH/Flk block.