Even in the Hindu Dharmasastra, the apocalyptic deluge plays a prominent part. According to the Matsya Purana, the Matsya avatar of Lord Vishnu, informed the King Manu of an all-destructive deluge which would be coming very soon.The King was advised to build a huge boat (ark) which housed his family, nine types of seeds, pairs of all animals and the Saptarishis to repopulate Earth, after the deluge would end and the oceans and seas would recede. At the time of the deluge, Vishnu appeared as a horned fish and Shesha appeared as a rope, with which Vaivasvata Manu fastened the boat to the horn of the fish. Variants of this story also appear in Buddhist and Jain scriptures.