The rotary flagellar motor of Escherichia coli bacterium switches stochastically between the clockwise (CW) and counterclockwise (CCW) direction. We found that the CW and CCW intervals could be described by a gamma distribution, suggesting the existence of hidden Markov steps preceding each motor switch. Power spectra of time series of switching events exhibited a peaking frequency instead of the Lorentzian profile expected from standard kinetic two-state models. Our analysis indicates that the number of hidden steps may be a key dynamical parameter underlying the switching process in a single bacterial motor as well as in large cooperative molecular systems.