A flame-retardant polyamide as reaction product of a lactam, especially of ε-caprolactam and/or laurolactam, and optionally with a content of further components, characterised in that it contains a flame-retardant polyamide FR which has in its main chain, in addition to the polyamide structural units of formula -NR 1 -(CHR" 1)n-CO-, in which the polyamide structural units also can be traced back to two or more different lactams and in which n represents an integer, especially an integer from 2 to 19, especially from 3 to 12, especially preferably from 5 to 10, R" 1 represents hydrogen, an organic linear or branched C 1 -C 10 group, preferably a C 1 -C 10 alkyl group, especially a methyl, ethyl, i-propyl, n-butyl, i-butyl or tert.butyl group, or a phenyl, acetyl group and/or silyl group, especially trimethylsilyl, tributylsilyl or triphenylsilyl group, the following phosphorus-modified structural units: phosphorus-modified structural units of formulae (IIIa1) and (IIIa2) and/or phosphorus-modified structural units of formulae (IIIb1) and (IIIb2) and optionally phosphorus-modified structural units of formulae (IIIa3), (IIIb3) and/or (IIIb4) where in formula (IIIa1) and in the following formulae and also in formula: R 1, independently of one another, represents hydrogen, a linear, cyclic or branched C 1 -C 6 alkyl group, especially a C 1 -C 3 alkyl group, an aryl group, especially with up to three condensed or uncondensed rings, especially in the form of a phenyl, benzyl, naphthyl, phenantryl, mesityl and/or tolyl group, an alkylaryl group, especially a triphenylmethyl group, and/or an arylalkyl group, especially an i-propylphenyl, tert.butyl-phenyl and/or nonylphenyl group, and/or an alkyl and/or arylsilyl group, especially a trimethylsilyl, tributylsilyl and/or triphenylsilyl group (definition), R 2 represents a divalent organic group, especially in the form of a linear, cyclic or branched C 1 -C 10 alkylene group, especially a C 1 -C 4 alkylene group, a C 1 -C 10 alkenylene group, especially a C 1 -C 6 alkenylene group, and/or a C 6 -C 10 arylene group, especially a 1,4-phenylene group, where the individual groups in the respective phosphinic acid amide structural units can differ in the main chain, and the flame-retardant polyamide FR has a relative viscosity, measured, according to DIN 51562, as a 1% solution in 96% sulphuric acid at 25°C, of at least 1.7, especially at least 1.9. phosphorus-modified structural units of formulae (IIIa1) and (IIIa2) and/or phosphorus-modified structural units of formulae (IIIb1) and (IIIb2) and optionally phosphorus-modified structural units of formulae (IIIa3), (IIIb3) and/or (IIIb4) where in formula (IIIa1) and in the following formulae and also in formula: R 1, independently of one another, represents hydrogen, a linear, cyclic or branched C 1 -C 6 alkyl group, especially a C 1 -C 3 alkyl group, an aryl group, especially with up to three condensed or uncondensed rings, especially in the form of a phenyl, benzyl, naphthyl, phenantryl, mesityl and/or tolyl group, an alkylaryl group, especially a triphenylmethyl group, and/or an arylalkyl group, especially an i-propylphenyl, tert.butyl-phenyl and/or nonylphenyl group, and/or an alkyl and/or arylsilyl group, especially a trimethylsilyl, tributylsilyl and/or triphenylsilyl group (definition), R 2 represents a divalent organic group, especially in the form of a linear, cyclic or branched C 1 -C 10 alkylene group, especially a C 1 -C 4 alkylene group, a C 1 -C 10 alkenylene group, especially a C 1 -C 6 alkenylene group, and/or a C 6 -C 10 arylene group, especially a 1,4-phenylene group, where the individual groups in the respective phosphinic acid amide structural units can differ in the main chain, and the flame-retardant polyamide FR has a relative viscosity, measured, according to DIN 51562, as a 1% solution in 96% sulphuric acid at 25°C, of at least 1.7, especially at least 1.9. R 1, independently of one another, represents hydrogen, a linear, cyclic or branched C 1 -C 6 alkyl group, especially a C 1 -C 3 alkyl group, an aryl group, especially with up to three condensed or uncondensed rings, especially in the form of a phenyl, benzyl, naphthyl, phenantryl, mesityl and/or tolyl group, an alkylaryl group, especially a triphenylmethyl group, and/or an arylalkyl group, especially an i-propylphenyl, tert.butyl-phenyl and/or nonylphenyl group, and/or an alkyl and/or arylsilyl group, especially a trimethylsilyl, tributylsilyl and/or triphenylsilyl group (definition), R 2 represents a divalent organic group, especially in the form of a linear, cyclic or branched C 1 -C 10 alkylene group, especially a C 1 -C 4 alkylene group, a C 1 -C 10 alkenylene group, especially a C 1 -C 6 alkenylene group, and/or a C 6 -C 10 arylene group, especially a 1,4-phenylene group, where the individual groups in the respective phosphinic acid amide structural units can differ in the main chain, and the flame-retardant polyamide FR has a relative viscosity, measured, according to DIN 51562, as a 1% solution in 96% sulphuric acid at 25°C, of at least 1.7, especially at least 1.9.