The first written evidence of the Kumbh Mela can be found in the accounts of Chinese monk Xuanzang who visited India in 629–645 CE, during the reign of King Harshavardhana However, similar observances date back many centuries, where the river festivals first started getting organised. According to medieval Hindu theology, its origin is found in one of the most popular medieval puranas, the Bhagavata Purana. The Samudra manthan episode (Churning of the ocean of milk), is mentioned in the Bhagavata Purana, Vishnu Purana, the Mahabharata, and the Ramayana.