A general strategy to maintain the coherence of a quantum bit is proposed. The analytical result is derived rigorously. It is based on an optimized pulse sequence for dynamic decoupling which turns out to be very efficient, in particular for strong couplings to the environment.