Khayr al-Din ibn Ahmad ibn Nur al-Din Ali ibn Zayn al-Din ibn Abd al-Wahab al-Ayubi al-Farooqui (1585–1671), better known as Khayr al-Din al-Ramli (), was a 17th-century Islamic jurist, teacher and writer in then Ottoman-ruled Palestine. He is well known for issuing a collection of fatwas that became highly influential in Hanafi (one of four major schools of thought in Sunni Islam) jurisprudence in the 18th and 19th centuries. Early life and Islamic studies Khayr al-Din al-Ramli was born in al-Ramla in Ottoman Palestine. At that time, al-Ramla was a major garrison town (and in the early years of Islamic rule it had been the administrative capital of the Jund Filastin, or military district of Palestine). Al-Ramli receives his name from the town; al-Ramli translates as "from Ramla." Not much is known about al-Ramli's early life other than he began reading the Qur'an as young child. In 1598-99 CE, al-Ramli traveled to Egypt with his elder brothers to study in al-Azhar, the highest scholarly authority in Sunni Islam. There he befriended Sheikh Fayed, a well-known sage in Egypt. Fayed taught him lessons on Islam as well as how to cut hair. At the time, al-Ramli was interested in studying the Shafi'i school of Sunni Muslim thought (madhab), but was discouraged by his older brother, Taj al-Din, who preferred he focus on the Hanafi madhab. According to his biographer Muhammad al-Muhibbi, al-Ramli had a dream in which the founder of the Shafi'i madhab, Imam Shafi'i, stated to him "We are all on the straight path." A senior figure in the 'ulema (council of scholars) of al-Azhar told al-Ramli that the dream signaled he should follow his brother's advice and study the Hanafi madhab. Muhibbi states that al-Ramli "worked hard" and "outdid" Taj al-Din, eventually gaining the attention of the lead scholar of al-Azhar, Sheikh Abdullah al-Nahiri. Al-Nahiri regularly invited al-Ramli and Taj al-Din to his home and gave them private lessons on the Hanafi thought. In 1603, al-Ramli graduated from al-Azhar and received honorary certificates from al-Nahiri as well as from another senior scholar, Sheikh Abd Allah. Prior to his return to al-Ramla, al-Ramli stopped in Gaza where he met the local ulema and the governor of the Gaza Sanjak, Ahmad ibn Ridwan. Ibn Ridwan was impressed by al-Ramli's new credentials and encouraged him to remain in Gaza which he did for a few months. Career Upon returning to al-Ramla in