Using the semiempirical quantum-chemical PM3 method, we have studied the formation of a quaternized diazine ring in a series of 4-dimethylaminonaphthalic acid derivatives under Vilsmeier-Haack reaction conditions. We have established that the reaction may occur via a two-step cycloisomerization of the intermediate Vilsmeier adduct, through six-center cyclic transition states.