A process for the preparation of a dimensionally stable one-component polyurethane foam from a storagestable mixture, under pressure, of a prepolymer which is the reaction product of polyols and organic polyisocyanates and containing isocyanate groups, and a blowing agent, with or without additives, by releasing the pressure and allowing the mixture to cure by interaction with the atmosphere, wherein a foamable mixture of a prepolymer containing isocyanate groups and a blowing agent, with or without additives, which contains from 0.1 to 15% by weight, based on the weight of the prepolymer containing isocyanate groups, of a blowing agent, which mixture is introduced into the inner container of a two-compartment pressure pack which contains a pressure medium in the outer container, and is discharged, when required, via a dispensing device.