Non-hygroscopic polystyrene-supported chloroaluminate ionic liquid was prepared from the reaction of Merrifield resin with pyridine followed by reaction with aluminium chloride. This Lewis acidic ionic liquid is an environmentally friendly heterogeneous catalyst for the Knoevenagel condensation of aromatic and aliphatic aldehydes with ethyl cyanoacetate. The catalyst is stable (as a bench top catalyst) and can be easily recovered and reused without appreciable change in its efficiency.