Treatment of ethyl 4-aryl-6-(trifluoromethyl)-2-oxo-2H-pyran-3-carboxylates, prepared from 4,4,4-trifluorobutane-1,3-diones, PCl 5 and sodium diethyl malonate, with sulfuric acid afforded the intramolecular Friedel–Crafts acylation products, 3-(trifluoromethyl)indeno[2,1-c]pyran-1,9-diones, from which 2-(trifluoromethyl)-6H-pyrano[3,4-c]quinoline-4,5-diones were obtained via the Schmidt reaction in moderate yields. The latter reacted with sodium azide to give 2-oxo-4-(5-trifluoromethyl-1,2,3-triazol-4-yl)-1,2-dihydroquinoline-3-carboxylic acids in good yields.