A new phosphorylated epoxy–imide polymer was obtained using diimide–diepoxide (DIDE) cured with tris(3-aminophenyl)phosphine oxide (TAPO). In addition, compositions of the synthesized diimide diepoxide (DIDE), Epon 828, and DEN 438 with common curing agents, e.g., 4,4′-diaminodiphenyl ether (DDE) and 4,4′-diaminodiphenylsulfone (DDS), were compared as to curing reactivity and heat and flame retardation with that of tris(3-aminophenyl)phosphine oxide. The reactivities of those curing agent toward the three kinds of epoxy resins, as measured by differential scanning calorimetry (DSC), were in the order DDE > TAPO > DDS. Through thermal gravimetric analysis (TGA), the thermal and flame resistances of epoxy were confirmed in this study as capable of being significantly improved through introduction of imide and phosphorus groups into the epoxide structure. © 1996 John Wiley & Sons, Inc.