It has now been found that basic modified polyamides and products produced from them such as threads, films or fibres which can be dyed with reactive dyes to produce lightfast dyeings which are fast to perspiration, water and boiling washes, even if the products are dyed to deep colour tones, can be obtained by the polycondensation of polyamide-forming starting materials, in particular lactams, in