The length of the flagellar hook is controlled by the soluble protein FliK. FliK is structurally divided into two halves with distinct functions; the N-terminal half determines hook length, while the C-terminal half switches the secretion substrate specificity, consequently terminating hook elongation. FliK properly achieves both functions only when it is secreted. In a previous paper, we showed that a temperature-sensitive flgE mutant of Salmonella enterica serovar Typhimurium, SJW2219, produced basal bodies with short hooks (average length, 25 nm) at 37°C. In this study, we show that the mutant cells grown at 37°C secrete FliK but not flagellin (FliC), indicating that FliK is abortively secreted into the medium when the hook is shorter than 30 nm. In contrast, FliK unfailingly switches the gate modes when the hook is longer than 30 nm. Taking the FliC, FliK, and FlgM secretion patterns into account, we conclude that FliK determines the minimal length of the hook. We will discuss how FliK detects the critical switching point of the secretion gate.