Sc(OTf)3-catalyzed three-component cyclization of arylamines, β,γ-unsaturated α-ketoesters, and 1,3-dicarbonyl compounds for the synthesis of highly substituted 1,4-dihydropyridines and tetrahydropyridines.