Rantideva

Rantideva (रन्तिदेव) is a king of the Lunar dynasty in Hinduism. Described to be benevolent, he is stated to have achieved moksha (liberation) from Vishnu when the Trimurti tested his faith. A descendant of Bharata, he is described as a generous king in Hindu literature.

Origin of the river Charmanvati
As Rantideva was a faithful follower of Vishnu, the king gave away to the Brahmanas his wealth and thus acquired righteous means. The king gave promises and engaged in performance of various sacrifices. Once, a mass of animals were in desire of attaining Svarga (heaven), and came by themselves to attain salvation in the Agnihotra sacrifice. The blood that flowed from the slaughtered cattle formed a river, which came to be known as the Charmanvati (Believed in local tradition to be the Chambal river). This is mentioned in the Drona Parva passage of the Hindu epic Mahabharata.

Meeting the Trimurti
In the Bhagavata Purana, Rantideva is once described to have offered everything he possessed for the needs of others, such that his family became destitute. Forty-eight days passed, and the king did not even have a sip of water to drink. The next morning, he happened to obtain a ghee and milk based dish called samyava. When he was about to partake of the dish, a Brahmana guest arrived at his doorstep. Perceiving the holy man to be a manifestation of Vishnu, he offered the man his share of the dish. When the meal was once again distributed among his family, a Shudra appeared, and the king offered him his share of the meal as well. Subsequently, a hunter with his hounds and a Chandala appeared at the very moment Rantideva was about to consume the dish. He selflessly offered his remaining portion of the dish to the former, and all the water that remained to the latter, declaring that rather than wishing for samsara, he would opt to suffer for the sake of all living beings, so that they may be free of their miseries. Even as Rantideva was dying of thirst, he declared that offering water to the unfortunate Chandala liberated his senses from pain. The Trimurti appeared before the king, and the latter learnt that it had been these deities who had appeared as his guests to test his faith. He bowed before them, and attended completely to Vishnu. He did not seek any boon from them, sustained by the strength of his devotion to his deity.