TECHNOLOGY FOCUS - ORGANIC CHEMISTRY - Preferred Compound: The amine (III) is of formula (IIIa) or (IIIb).    TECHNOLOGY FOCUS - POLYMERS - Preparation (claimed): Preparation of the polymer (P1) involves reacting a maleic anhydride polymer with at least one amine of formula (III). Preferred Components: The amic acid or maleimide moiety is of formula (Ia), (Ib) or (Ic). The solid polymer electrolyte or gel electrolyte comprises a metal carboxylic acid salt connected to the polymer backbone or complexed electrolyte salt. The maleic anhydride polymer is a maleic anhydride copolymer with an ethylenically unsaturated monomer selected from styrenes, olefins, or (meth)acrylic acid esters and amides. Preferred Method: In the process for preparing the polymer (P1), 1-99% of the anhydride units are reacted with the amine. Preferred Definitions:    G1=H, 1-12C alkyl or metal cation selected from Li, Na, K, Mg or Ca;    E1=H;    R and R'=H or methyl;    R''=H, 1-12C alkyl, 1-12C alkyl carbonyl, phenyl (optionally substituted by at least one 1-12C alkyl, benzyl or phenethyl (both optionally substituted by at least one 1-12C alkyl) or -CH2-CH(R')-N(E')2);and    E'=H.    EXAMPLE - A solid membrane was prepared by mixing a 12 wt.% solution of poly(styrene-co-maleic anhydride) (PSMAn) copolymer A7 having a molecular weight of 1600 (2.9 g) and a 40 wt.% solution of polyethyleneoxide diamine of formula NH2-CH(CH3)-CH2-(O-CH(CH3)-CH2)x-(O-CH2-CH2)y-(O-CH(CH3)-CH2)z-O-CH2-CH(CH3)-NH2 (where y is approximately 39 and x+z is 6) having a molecular weight of 2000 (7.5 g) in tetrahydrofuran (THF) to form a clear reaction solution of low viscosity and three minutes after preparation of the reaction solution casting the reaction solution ( approximately 1.5 g) into glass Petri dishes and an aluminum weighing dish. The cast solutions are allowed to cure and evaporate out solvent at room temperature. After 15 minutes the cast films were dry to touch and insoluble in THF. Cure, as determined by no further change in appearance, mechanical properties and solvent swelling, was considered complete after standing overnight at room temperature producing clear, rubbery, dry films which were peeled off the casting dishes to yield solid membranes.