 Legal status of Jainism as a distinct religion in India

Jainism is considered to be a legally distinct religion in India.A section of scholars earlier considered it as a Hindu sect or a Buddhist heresy, but it is one of the three ancient Indian religions.