It is said that Acharya Jinasena finds the first scriptural reference to Diwali in the Jain scripture, Harivamsha Purana. None of the principal Hindu scriptures mention the festival in particular. This has made some people to believe, that Diwali was originally a Jain festival and later adopted by Hindus as a festival of their own. The full moon day in Kartik, the first month of the Indian calendar, brings in the festival of Dev Diwali and this day is also known as Tripurari Purnima. Jains celebrate Dev Diwali in honour of the final liberation or death of Mahavira. At the age of seventy-two, Mahavira passed into the `Supreme State` (nirvana) in the city of Pavapuri (Patna) in Bihar.
For six days, the Tirthankara preached continuously on the Jain way of life and righteous living and when on the sixth night the audience fell asleep, Mahavira passed into the `Supreme State`. When the people woke up the following morning, they saw his mortal remains. The leader of the congregation then announced that since the light of the world had gone out, they should light the city and the people illuminated the city of Pavapuri with lamps. Deva Diwali is still celebrated in memory of that day. Since Mahavira died at night, he is worshipped by the Jains at midnight and in the early morning hours, when the Agams (Jain holy books) are read and homes and temples are illuminated. Lamps are lit under the moonlight sky and a family celebrates this day by feasting.
Thousands of Jain pilgrims from all over India visit the sacred Mount Girnar in Gujarat. Special celebrations are held on this day. According to Jain legends, the first disciple of Mahavira, Ganadhar Gautam Swami, also attained complete knowledge on this very day. Thus, Diwali is a really special occasion for the Jains. The Jains celebrate Diwali in a different way. There is a note of asceticism in what ever the Jains do and the celebration of Diwali is not an exception. The Jains celebrate Diwali during the month of Kartik for three days. During this period, devoted Jains observe fasting and chant the Uttaradhyayan Sutra, which contain the final pravachans of Lord Mahavira and meditate upon him. This day signifies the return of God after spending Chaturmas (The "Chaturmas" begins on the Ekadashi in the month of Ashadha and ends with the Ekadashi in the month of Kartik) with King Bali. Devas celebrated his arrival with great joy and thus Dev Diwali came into being.
One more story behind the celebrations of Bhai-Duj is that when Bhagwan Mahavir attained `Nirvana`, his brother Raja Nandi-Vardhan became very sad. Then, it was his sister Sudarshana, who comforted him. Since then, women have been revered during this festival. This day helps to strengthen the ties between brothers and sisters.