In trifluoromethanesulfonic acid, 2-nitromethylene-1-(ω-phenylalkyl)imidazolidine or 2-nitromethylene-1-(ω-phenylalkyl)hexahydropyrimidine derivatives undergo an intramolecular cyclization to afford (E)-hydroxyiminohydroazaazoniabenzocycloalkenes, in their trifluoromethanesulfonate salt form. The reaction probably occurres via the formation of an electrophilic transient hydroxynitrilium ion (or O-protonated nitrile oxide). The yields are generally good, except for the higher-membered ring derivatives.