Five-membered, nitrogen-containing heterocycles such as oxazole, oxazoline and imidazolidine are important structural motifs of many natural and synthetic compounds, as well as drugs with diverse bioactivity. An efficient strategy for the synthesis of new heterocyclic compounds such as 1,3-oxazole, 1,3-oxazoline and 1,3imidazolidine from 2,5-bis-(butylsulfanyl)-2,3-dihydro-4H-pyran-2-carbaldehyde has been developed.