A gas generator (10) for an airbag system comprises: a combustion chamber housing (12) containing fuel (18) capable of being activated by a detonator unit (11); and an expansion chamber housing (13) into which gas generated by activation of the fuel (18) flows. The detonation unit (11), combustion chamber housing (12) and expansion chamber housing (13) are arranged one behind the other along the longitudinal axis of the gas generator (10) and interconnected and form an elongated cylindrical unit. The gas generator (10) can thus, given its minimal space requirement, be fitted almost anywhere in the vehicle while being capable of optimal connection to other components of the airbag system.