An environmentally benign, ionicliquid promoted multicomponent protocol to benzopyrano(2,3-d)pyrimidines and 4H-chromenes has been developed at roomtemperature. Results of the reaction depend on the nature of the nucleophile used in the reaction. Secondary amines result in the formation of benzopyrano(2,3-d)pyrimidines, whereas thiols give rise to 4H-chromenes under the same set of reaction conditions