The Afghan Durrani dynasty's Sadozai Kingdom controlled Kashmir from 1751, when weakling 15th Mughal padshah (emperor) Ahmad Shah Bahadur's viceroy Muin-ul-Mulk was defeated and reinstated by the Durrani founder Ahmad Shah Durrani (who conquered, roughly, modern day Afghanistan and Pakistan from the Mughals and local rulers), until the 1820 Sikh triumph. The Afghan rulers brutally repressed Kashmiris of all faiths (according to Kashmiri historians)