he had studied the histories of persia and the arabian peninsula ; he spoke both arabic and farsi fluently , could recite entire sections of the qur'an by heart , as well as a multitude of muslim prayers .