Shah Waliullah lived in 18th century India during a time of political, moral, and religious decline of the Mughal Empire. He sought to reform Muslim society and minimize sectarian tensions through his writings, teachings, and new philosophical interpretation of Islam. He translated the Quran to Persian and advised rulers on social justice and reducing corruption. He also wrote letters encouraging the Afghan ruler Ahmad Shah Abdali to invade India and defeat the rising Maratha empire, which Abdali did at the Third Battle of Panipat in 1761. Overall, Shah Waliullah worked to renew and strengthen Islam in India during a weakening of the Mughals.