Khamenei 's comments came as he marked the birthday of Imam Ali , the first Imam of Shia Muslims .