One of the reasons for decline in Jainism was the spread of Buddhism in India and their attacks on Jainism.
According to a Shaivite legend, the Pandya king Koon Pandiyan ordered a massacre of 8,000 Jain monks.