According to Kasem Ajram, petroleum was distilled by the Persian alchemist Muhammad ibn Zakar??ya R??zi (Rhazes) in the 9th century, producing chemicals such as kerosene in the alembic (al-ambiq),[3][verification needed] and which was mainly used for kerosene lamps.[4] Arab and Persian chemists also distilled crude oil in order to produce flammable products for military purposes.