The Ramayana of Valmiki concludes its central narrative with Rama's return to Ayodhya following the completion of his fourteen year exile and his victory over Ravana, accompanied by Sita and his brother Lakshmana, along with Hanuman and the allies who had supported his cause. Tradition holds that the people of Ayodhya, overjoyed at the return of their rightful prince after so long an absence, lined the city's roads and rooftops with rows of oil lamps to welcome the returning party home on a moonless night, illuminating the darkness with a display later generations understood as the origin of Diwali, the Festival of Lights.
Rama's return is followed in the epic by his formal coronation as king, an event called the Rama Rajyabhisheka, inaugurating what the tradition remembers as Rama Rajya, a reign celebrated in later Hindu political and devotional thought as an ideal of just and righteous governance, frequently invoked as a moral and political touchstone well beyond strictly religious contexts.
The image of a city lit entirely with small lamps to welcome home a rightful ruler after long exile and hard-won victory became one of the most enduring and widely reproduced images in Hindu devotional art and popular memory, directly informing how Diwali continues to be visually and ritually observed today.