A Lewis base-catalyzed intramolecular vinylogous aldol reaction of o-(allyloxy)phenyl ketoesters or o-(allylamino)phenyl ketoesters has been developed. This reaction provides ready access to 3-hydroxy-2,3-disubstituted dihydrobenzofurans and indolines in high yields with excellent chemoselectivity and diastereoselectivity. An acid-promoted dehydration of such products further extends the utility of the reaction to the synthesis of 2-alkenyl benzofurans and indoles.