A probable mechanism for the formation of the imidazo[1,2-a]azine core involves a
non-concerted [4+1] cycloaddition between the protonated Schiff base (which holds both the nucleophilic and electrophilic character) and the isocyanide (which behaves as a vinylidene carbenoid). Under acidic conditions an aldehyde and a primary amine can react to form what is known as an iminium ion or Schiff base.
It is this iminium ion which contains both the nucleophilicity and electrophilicty which is essential for the [4+1] cycloaddition of the isocyanide.
The final step in the formation of the -aminoimidazole is a prototropic shift forming the final aromatic product