The invention relates to a method of producing phthalic acid anhydride by guiding a flow of gas containing o-xylene, oxygen and sulfur dioxide over a heavy-metal containing catalyst at an elevated temperature. The inventive method is characterized by limiting the content of N-acyl compounds contained in the flow of gas to less than 200 ppm based on the weight of o-xylene.