According to the epic Mahābhārata, Bareilly region (Panchala) is said to be the birthplace of Draupadi, who was also referred to as 'Panchali' (one from the kingdom of Panchāla) by Kṛṣṇā (Lord Krishna). When Yudhishthira becomes the king of Hastinapura at the end of the Mahābhārata, Draupadi becomes his queen. The folklore says that Gautama Buddha had once visited the ancient fortress city of Ahicchattra in Bareilly. The Jain Tirthankara Parshva is said to have attained Kaivalya at Ahichhatra.