The invention relates to a thermoplastic molding composition comprising a) from 30 to 95% by weight of at least one aliphatic polyamide or copolyamide, as component A, b) from 1 to 15% by weight of at least one cyclic phenoxyphosphazene having at least 3 phenoxyphosphazene units, as component B, c) from 3 to 20% by weight of at least one (di)phosphinate salt, as component C, d) from 1 to 15% by weight of at least one reaction product of melamine with a phosphorus acid, as component D, e) from 0 to 5% by weight of at least one metal borate, as component E, f) from 0 to 20% by weight of at least one impact-modifying polymer, as component F, g) from 0 to 50% by weight of glass fibers, as component G, and h) from 0 to 30% by weight of further additives, as component H, where the total amount of components A to H gives 100% by weight.