The present invention relates to novel acylmethylene-1,3-dioxolanes and acylmethylene-1,4-dioxanes of the general formula (I) in which R1, R2, R3 and n have the meanings given in the description, and also a novel process for their preparation. Acylmethylene-1,3-dioxolanes and acylmethylene-1,4-dioxanes are important intermediates for the preparation of pyrazoles and anthranilamides, which can be used as insecticides.