Shah Abdur Rahim (Persian: شاه عبد الرحیم; 1644-1719) was an Islamic scholar and a writer who assisted in the compilation of Fatawa-e-Alamgiri, the voluminous code of Islamic law. He was the father of the Muslim philosopher Shah Waliullah Dehlawi. He became a disciple of Khwaja Khurd son of Khawaja Baqi billah a revered Sufi of Delhi.He established Madrasa Rahimiyya in Delhi, a theological college which later played a part in the religious emancipation of Muslim India and became the breeding ground of religious reformers and mujahideen like Shah Waliullah and Shah Abdul Aziz.