Cyanomethylenetributylphosphorane was shown to mediate the dehydrocyclization of diols and amino alcohols to give the corresponding 6-membered O-and N-heterocycles in 90% or better yields. Using the reaction as a key step,(+)-α-skytanthine, a unique mono terpene alkaloid, was synthesized stereoselectively.