The Rōshānī movement (روښاني غورځنګ, "the enlightened movement") was a populist, nonsectarian Sufi movement that was founded in the mid-16th century and arose among Afghan tribes. The movement was founded by the Ormur warrior, poet, Sufi and revolutionary leader Bayazid Ansari, who is more commonly known as Pir Roshan ("Saint of Light Pir (sufi master)"). Bayazid challenged the inequality and social injustice that he saw being practiced by the ruling powers of the Mughal empire. He advocated for a system of egalitarian codes and tenets that his followers, the Roshaniyya, promulgated within Islam. Bayazid educated and instructed followers of the movement through new and radical teachings that questioned basic Islamic canons during that time, and propagated egalitarian principles. His teachings resonated among the Afridi, Orakzai, Khalil, Mohmand, and Bangash tribes of Afghanistan. The Roshaniyya were a millenarian Sufi group popular with Afghan populations in the northwestern regions of the Mughal Empire. The group achieved strong influence and authority among the eastern Pashtun tribes and played a significant role in Pashtun history and in the policy of the Mughal Empire on its western frontiers. The movement itself was a challenge to Afghan tribal society, and its purpose was to raise issues of leadership, authority, and social ethics. Its leaders were the followers and disciples of Bayazid Ansari, and membership within the movement threatened to undermine traditional tribal leadership. The Roshaniyya movement went through three phases: the first phase lasted from 1565 to 1585, the second phase from 1585 to 1605, and the third phase from 1605 to 1632. Bayazid Ansari was born in 1525, and had an early experience of victimization at the hands of the Mughals that persisted throughout his lifetime and ultimately led to his leadership of an insurrection against the Mughal government in Kabul. At a young age, Bayazid was sent to master the Qur'an and through his studies he became more devout in his worship of God.