information:filtering
History

The five-day long festival originated in the Indian subcontinent and is likely a fusion of harvest festivals in ancient India. It is mentioned in early Sanskrit texts, such as the Padma Purana and the Skanda Purana, both of which were completed in the second half of the 1st millennium AD. The diyas (lamps) are mentioned in Skanda Kishore Purana as symbolising parts of the sun, describing it as the cosmic giver of light and energy to all life and which seasonally transitions in the Hindu calendar month of Kartik.

Emperor Harsha refers to Deepavali, in the 7th-century Sanskrit play Nagananda, as Dīpapratipadotsava (dīpa = light, pratipadā = first day, utsava = festival), where lamps were lit and newly engaged brides and grooms received gifts. Rajasekhara referred to Deepavali as Dipamalika in his 9th-century Kavyamimamsa, wherein he mentions the tradition of homes being whitewashed and oil lamps decorated homes, streets, and markets in the night.

Diwali was also described by numerous travelers from outside India. In his 11th-century memoir on India, the Persian traveller and historian Al Biruni wrote of Deepavali being celebrated by Hindus on the day of the New Moon in the month of Kartika. The Venetian merchant and traveller Niccolò de' Conti visited India in the early 15th-century and wrote in his memoir, "on another of these festivals they fix up within their temples, and on the outside of the roofs, an innumerable number of oil lamps... which are kept burning day and night" and that the families would gather, "clothe themselves in new garments", sing, dance, and feast. The 16th-century Portuguese traveler Domingo Paes wrote of his visit to the Hindu Vijayanagara Empire, where Dipavali was celebrated in October with householders illuminating their homes, and their temples, with lamps. It is mentioned in the Ramayana that Diwali was celebrated for only 2 years in Ayodhya.

Islamic historians of the Delhi Sultanate and the Mughal Empire era also mentioned Diwali and other Hindu festivals. A few, notably the Mughal emperor Akbar, welcomed and participated in the festivities, whereas others banned such festivals as Diwali and Holi, as Aurangzeb did in 1665.

Publications from the time of the British Raj also made mention of Diwali, such as the note on Hindu festivals published in 1799 by Sir William Jones, a philologist known for his early observations on Sanskrit and Indo-European languages. In his paper on The Lunar Year of the Hindus, Jones, then based in Bengal, noted four of the five days of Diwali in the autumn months of Aswina-Cartica as the following: Bhutachaturdasi Yamaterpanam (2nd day), Lacshmipuja dipanwita (the day of Diwali), Dyuta pratipat Belipuja (4th day), and Bhratri dwitiya (5th day). The Lacshmipuja dipanwita, remarked Jones, was a "great festival at night, in honour of Lakshmi, with illuminations on trees and houses".