A multifunctional crosslinking agent, a crosslinked polymer, and a method of making the same are disclosed. The multifunctional crosslinking agent, which may be used to crosslink amine-terminated polyamides, polyimides, or poly(amide-imide)s, includes three or four anhydride functional groups. The multifunctional crosslinking agent may be defined by a general chemical formula (I): (Z—Ar—)n—W, wherein W represents an anhydride functional group that is directly or indirectly bonded to Ar; Ar represents an aryl group that is directly bonded to W; and n is equal to 3 when W is P═O or N, or n is equal to 4 when W is Si or a carbon moiety.