Xanthylium, thioxanthylium, or tropylium salts were reacted with imidazole and benzimidazole. The reactions gave the substitution products of the secondary amino hydrogen atoms in the imidazole and benzimidazole heterorings by xanthyl, thioxanthyl, and tropylium fragments. The structure of the obtained compounds was established by mass spectrometry, 1H NMR spectroscopy, and X-ray diffraction analysis.