The nonlinear stability of a pulsating detonation wave driven by a three-step chain-branching reaction is studied. The reaction model consists sequentially of a chain-initiation step and a chain-branching step, both governed by Arrhenius kinetics, followed by a temperature-independent chain-termination step. The model mimics the essential dynamics of a real chain-branching chemical system, but is sufficiently idealized that a theoretical analysis of the instability is possible. We introduce as a bifurcation parameter the chain-branching cross-over temperature (T-B), which is the temperature at which the chain-branching and chain-termination rates are equal. In the steady detonation structure, this parameter controls the ratio of the chain-branching induction length to the length of the recombination zone. When T-B is at the lower end of the range studied, the steady detonation structure, which is dominated by the temperature-independent recombination zone, is found to be stable. Increasing T-B increases the length of the chain-branching induction region relative to the length of the recombination zone, and a critical value of T-B is reached where the detonation becomes unstable, with the detonation shock pressure evolving as a single-mode low-frequency pulsating oscillation. This single-mode nonlinear oscillation becomes progressively less stable as T-B is increased further, persisting as the longterm dynamical behaviour for a significant range of T-B before eventually undergoing a period-doubling bifurcation to a two-mode oscillation. Further increases in T-B lead to a chaotic behaviour, where the detonation shock pressure history consists of a sequence of substantive discontinuous jumps, followed by lower-amplitude continuous oscillations. Finally, for further increases in T-B a detonability limit is reached, where during the early onset of the detonation instability, the detonation shock temperature drops below the chain-branching cross-over temperature causing the wave to quench.