The mechanism of synthesis of maleic and phthalic anhydrides by the gas phase oxidation of n-pentane over VPO-based catalysts was studied. The oxidation of the paraffin was carried out under conditions which may lead to the isolation of possible reaction intermediates: very low residence time and high n-pentane/oxygen ratio. Under these conditions a number of by-products were identified, which were attributed to the oxidation of intermediate pentene and pentadiene, as well as other products with more than 5 C atoms, among which were alkylaromatics. Alkylaromatics also were found to be formed in the anaerobic transformation of pentadiene. A mechanism is proposed, which takes into account the oxidehydrogenation of the paraffin to pentene and pentadiene, followed by two parallel pathways: (i) dimerization, dehydrocyclization and aromatization of the diolefin, followed by oxidation of the alkylaromatic to phthalic anhydride, and (ii) multi-step oxidation of pentadiene to maleic anhydride.