Circa 1000 CE, the Punjab came under the rule of Muslims[19] and was part of the Delhi Sultanate, Mughal Empire, and Durrani Empire.[20] Sikhism was founded in the 1500s and 1600s by the Sikh Gurus in the Punjab and resulted in the formation of the Sikh Confederacy after the fall of the Mughal Empire and ensuing conflict with the Durrani Empire.[21] This confederacy was united into the Sikh Empire in 1801 by Maharaja Ranjit Singh.[22]