Synthesis of trans-aconitic acid molecularly imprinted polymers in [bmim][BF4] and [bmim][PF6] under photochemical (5 degrees C, AIBN) and thermal (60 degrees C, AIBN) conditions gave polymer micro-spheres (<200 nm), under bulk and precipitation polymerisation conditions, and higher selectivity indices (100% improvement) relative to the more traditional precipitation polymerisation (CH3CN, high solvent volumes) approach.