A series of phosphorus-containing poly(1,3,4-oxadiazole-ester-imide)s was prepared by polycondensation reaction of an aromatic dianhydride, namely 1,4-[2-(6-oxido-6H-dibenz<c,e><1,2>oxaphosphorin-6-yl)]-naphthalene-bis(trimellitate)dianhydride, with different aromatic diamines containing 1,3,4-oxadiazole ring. A solution imidization procedure was used to convert quantitatively the poly(amic acid) intermediates to the corresponding polyimides. The chemical structures of the monomers and polymers were confirmed by Fourier transform infrared, 1H NMR and 31P NMR spectroscopy. The polymers were easily soluble in polar solvents such as N-methyl-2-pyrrolidone (NMP), N,N-dimethylformamide and tetrahydrofuran. They exhibited good thermal properties having the decomposition temperature above 380°C and the glass transition temperature in the range of 201–232°C. Due to the presence of phosphorus the polymers gave high char yield in termogravimetric analysis, hence good flame retardant properties. Optical properties were analyzed in solution by using UV–vis and photoluminescence spectroscopy. Solutions of the polymers in NMP exhibited photoluminescence in the blue region. Copyright © 2010 John Wiley & Sons, Ltd.