Mazdak

Mazdak (, Middle Persian: 𐭬𐭦𐭣𐭪, also Mazdak the Younger; died c. 524 or 528) was a Zoroastrian "mobad" (priest), Iranian reformer, prophet and religious reformer who gained influence during the reign of the Sasanian emperor Kavadh I. He claimed to be a prophet of Ahura Mazda and instituted social welfare programs. 
Mazdakism.
Mazdak was the chief representative of a religious and philosophical teaching called Mazdakism, which he viewed as a reformed and purified version of Zoroastrianism, although his teaching has been argued to display influences from Manichaeism as well. Zoroastrianism was the dominant religion of Sassanid Persia, and Mazdak himself was a mobad or Zoroastrian priest, but most of the clergy regarded his teaching as heresy. Surviving documentation is scarce. Some further details may be inferred from the later doctrine of the Khurramites, which has been seen as a continuation of Mazdakism.
Origins.
Some sources claim that the original founders of this sect lived earlier than Mazdak. These were another mobad, Zaradust-e Khuragen (distinct from the founder of Zoroastrianism, Zoroaster, Middle Persian "Zardusht") and/or a Zoroastrian philosopher known as Mazdak the Elder, who taught a combination of altruism and hedonism: "he directed his followers to enjoy the pleasures of life and satisfy their appetite in the highest degree with regard to eating and drinking in the spirit of equality, to aim at good deeds; to abstain from shedding blood and inflicting harm on others; and to practise hospitality without reservation". This doctrine was further developed by the much better-known Mazdak the Younger, son of Bāmdād.
At later stages the conservative Zoroastrian opposition accused Mazdak's followers of heresy and with abhorrent practices such as the sharing of women, for which scholars have found no evidence. Mazdak's followers are considered to be the first real socialists in human history by their emphasis on community property and community work with benefits accruing to all.
Theological tenets.
Like both Zoroastrianism (at least as practised at the time) and Manichaeism, Mazdakism had a dualistic cosmology and worldview. This doctrine taught that there were two original principles of the universe: Light, the good one; and Darkness, the evil one. These two had been mixed by a cosmic accident, tainting everything except God. Light is characterized by knowledge and feeling, and acts by design and free will, whereas Darkness is ignorant and blind, and acts at random. Mankind's role in this life was, through good conduct, to release the parts of himself that belonged to Light. But where Manichaeism saw the mixture of good and bad as a cosmic tragedy, Mazdak viewed this in a more neutral, even optimistic way.
In addition, Mazdakism is reported, in one late work, to have distinguished three elements (Fire, Water, Earth), and four Powers (Discernment, Understanding, Preservation and Joy), corresponding to the four chief officials of the Sassanid state – the Chief Mobad ("Mobadan Mobad"), the Chief Herbad, the Commander of the Army and the Entertainment Master), seven Viziers and twelve Spiritual Forces. When the Four, the Seven and the Twelve were united in a human being, he was no longer subject to religious duties. In addition, God was believed to rule the world through letters, which held the key to the Great Secret that should be learned. This description suggests that Mazdakism was, in many ways, a typical Gnostic sect.
Ethical and social principles.
Two distinguishing factors of Mazdak's teaching were the reduction of the importance of religious formalities—the true religious person being the one who understood and related correctly to the principles of the universe—and a criticism of the strong position of mainstream clergy, who, he believed, had oppressed the Persian population and caused much poverty.
Mazdak emphasised good conduct, which involved a moral and ascetic life, no killing and vegetarianism (considering meat to contain substances derived solely from Darkness), being kind and friendly and living in peace with other people. In many ways Mazdak's teaching can be understood as a call for social revolution, and has been referred to as early "communism".
According to Mazdak, God had originally placed the means of subsistence on earth so that people should divide them among themselves equally, but the strong had coerced the weak, seeking domination and causing the contemporary inequality. This in turn empowered the "Five Demons" that turned men from Righteousness—these were Envy, Wrath, Vengeance, Need and Greed. To prevail over these evils, justice had to be restored and everybody should share excess possessions with his fellow men. Mazdak allegedly planned to achieve this by making all wealth common or by re-distributing the excess, although it is unclear how he intended to organize that in terms of regulations and to what extent his position has been caricatured by hostile sources. The hostile sources mostly dwell on the alleged "sharing" of women, the resulting sexual promiscuity and the confusion of the line of descent. Since the latter is a standard accusation against heretical sects, its veracity has been doubted by researchers; it is likely that Mazdak took measures against the widespread polygamy of the rich and lack of wives for the poor.
Followers.
Mazdak's teaching acquired many followers, to the point when even King Kavadh I, ruling from 488 until 531, converted to Mazdakism. He also reportedly sponsored its adoption by the Arab vassal kingdom of al-Hirah, entailing the deposing of the previous king al-Mundhir by the Kindite chief al-Harith.
With the King's backing Mazdak could embark on a program of social reform, which involved pacifism, anti-clericalism and aid programs for helping the poor. Mazdak had government warehouses opened to help the poor. He also had all the Zoroastrian fire temples closed except the three major ones.
Opposition to and purge of Mazdak's adherents.
Fear among the nobility and Zoroastrian clergy grew so strong that King Kavadh was overthrown in 496, but he managed to regain the throne three years later with the help of the Hephthalite Empire.
Scared by the resistance among the powerful, he chose to distance himself from Mazdak. He allowed Anushiravan to launch a campaign against the Mazdakites in 524 or 528, culminating in a massacre of most of the adherents – including Mazdak himself – and restoring orthodox Zoroastrianism as the state religion. Various fictionalized accounts specify the manner of execution: for example, the "Shahnameh" states that 3,000 Mazdakites were buried alive with the feet upwards in order to present the spectacle of a "human garden", whereas Mazdak himself was hanged upside down and shot with countless arrows; other stories specify other torturous methods of execution. Anushiravan then proceeded to implement his own far-reaching social and administrative reforms. The Mazdakite ruler of al-Hirah was also overthrown and the previous king restored to power.
Jewish tradition.
A Jewish tradition relates a slightly different story. The Exilarch of Babylon, Mar-Zutra II, rallied the Jewish community and their allies, who defeated Mazdak and established an independent Jewish kingdom in Mahoza that lasted for seven years 
(495–502).
Legacy.
A few Mazdakites survived and settled in remote areas. Small pockets of Mazdakite societies are said to have survived for centuries after the Muslim conquest of Persia. Their doctrines probably mixed with radical currents of Shia Islam, influencing them and giving rise to later powerful revolutionary-religious movements in the region. The cult of al-Muqanna‘, who claimed to be the incarnation of God and had followers among the Mubaiyyidah sect of Zoroastrianism and even some Turks, upheld the laws and institutes of Mazdak. In the 9th century, the Khurramites, an egalitarian religious sect possibly originating from Mazdakism, led a revolt under the leadership of Babak Khorramdin against the Abbasid Caliphate and successfully defended large territories against the Caliphate's forces for some twenty years. The Batiniyya, Qarmatians and other later revolutionary currents of Islam may also be connected to Mazdakism and were often equated with it by contemporary authors.
Turkish scholar Abdülbâkî Gölpınarlı sees even the Qizilbash of the 16th century – a radical Shi'i movement in Persia which helped the Safaviyya establish Twelver Islam as the dominant religion of Iran – as "spiritual descendants of the Khurramites" and, hence, of the Mazdakites. "Mazdakist" eventually seems to have become a standard derogative label attached by pre-modern Persian and Arabic authors to any radical egalitarian movement in subsequent Iranian history. While medieval Muslim historiography primarily focused on the "socialist" aspects of Mazdak, Zoroastrian tradition, on the other hand, remembers Mazdak above all as a dangerous heretic and enemy of the true faith ("Zand-i Wahman yasn" 2:1).
The author of the "Dabestan-e Mazaheb", writing as late as the 17th century, claims to have met individual adherents of Mazdakism who practised their religion secretly among the Muslims and preserved the "Desnad", a book in Middle Persian containing the teachings of Mazdak.
Philosopher and poet Muhammad Iqbal, who inspired the Pakistan Movement in British India, termed Karl Marx as the modern reincarnation of Mazdakite thought. In the poem Ibless ki Majlis-e-Shura, he drew similarities between Marxism and Mazadak thought of redistribution of excess, reduction of the importance of religious formality, emancipation of love and social revolution. Iqbal describes Karl Marx as reincarnation of the soul of Mazdak. These views penned in 1936, when Russian Revolution was still fledgling, remained skeptical if Mazdakite logic of Marxism was the solution of problems of the poor and the downtrodden. Iqbal devotes a chapter on Mazdak in his PhD thesis with Munich University on The Development of Metaphysics in Persia