To improve the stability of optochemical sensors (optodes), the fluorescence indicator 1-amino-4-allyloxyanthraquinone (AAA), which was synthesized by reacting allyl bromide with 1-amino-4-hydroxyanthraquinone, was covalently immobilized on surface-modified glass slides. The resulting sensor was used to determine the content of ornidazole based on fluorescence quenching. It showed a linear response toward ornidazole in the concentration range of 9.0 x 10(-6) to 1.0 x 10(-3) mol L(-1) with a detection limit of 8 x 10(-6) mol L(-1) at pH 7.5. This AAA-immobilized sensor has a rapid response, high stability and good selectivity to ornidazole.