A gas generator has a first chamber containing a first amount of substance of a solid propellant providing filling gas and a second chamber containing a second amount of substance providing filling gas. An igniter is associated with the first chamber only. The first chamber has outflow openings providing a flow connection with an environment of the gas generator. After activation of the gas generator, the second chamber is connected with the environment of the gas generator with regard to flow exclusively via the first chamber.