A Bayesian zero-velocity detector for foot-mounted inertial navigation systems is presented. The detector extends existing zero-velocity detectors based on the likelihood-ratio test and allows, possibly time-dependent, prior information about the two hypotheses-the sensors being stationary or in motion-to be incorporated into the test. It is also possible to incorporate information about the cost of a missed detection or a false alarm. Specifically, we consider a hypothesis prior based on the velocity estimates provided by the navigation system and an exponential model for how the cost of a missed detection increases with the time since the last zero-velocity update. Thereby, we obtain a detection threshold that adapts to the motion characteristics of the user. Thus, the proposed detection framework efficiently solves one of the key challenges in current zero-velocity-aided inertial navigation systems: the tuning of the zero-velocity detection threshold. A performance evaluation on data with normal and fast gait demonstrates that the proposed detection framework outperforms any detector that chooses two separate fixed thresholds for the two gait speeds.