From the Bhāgavata Purāna
“Desiring the preservation of herds, Brāhmans, genii, and virtuous men—of the Vedas, of law, and of precious things—the Lord of the Universe assumes many bodily shapes; but though he pervades, like the air, a variety of beings, yet he is himself unvaried, since he has no qualities subject to change. At the close of the last Kalpa there was a general destruction, occasioned by the sleeping Brahmā, whence his creatures in different worlds were drowned in a vast ocean. Brahmā being inclined to slumber, desiring repose after a lapse of ages, the strong demon Hayagriva came near him, and stole the Vedas, which had flowed from his lips.
When Hari, the preserver of the universe, discovered this deed of the prince of the Dānavas, he took the shape of a minute fish, called Sāphari. A holy king named Satyavrāta then reigned—a servant of the spirit which moved on the waves; and so devout, that water was his only sustenance. He was the child of the Sun, and in the present Kalpa is invested by Nārāyana with the office of Manu (i.e. the progenitor and lord of men), by the name of Srāddhadevā, or the god of obsequies. One day as he was making a libation in the river Kritamāla, and held water in the palm of his hand, he perceived a small fish moving in it. The King of Dravira immediately dropped the fish into the river, together with the water which he had taken from it; when the Sāphari thus addressed the benevolent monarch: ‘How canst thou, O king, who showiest affection to the oppressed, leave me in this river water, where I am too weak to resist the monsters of the stream, who fill me with dread?’
He, not knowing who had assumed the form of a fish, applied his mind to the preservation of the Sāphari, both from good-nature and from regard to his own soul; and, having heard his very suppliant address, he kindly placed it under his protection in a small vase full of water; but in a single night its bulk was so increased that it could not be contained in the jar, and thus again addressed the illustrious prince: I am not pleased with living miserably in this little vase; make me a large mansion, where I may dwell in comfort.’ The king, removing it thence, placed it in the water of a cistern; but it grew three cubits in less than fifty minutes, and said, ‘O king! it pleases me not to stay vainly in this narrow cistern; since thou hast granted me an asylum, give me a spacious habitation.’ He then removed it and placed it in a pool, where, having ample space around its body, it became a fish of considerable size. ‘This abode, O king, is not convenient for me, who must swim at large in the waters; exert thyself for my safety, and remove me to a deep lake!’ Thus addressed, the pious monarch threw the suppliant into a lake, and, when it grew of equal bulk with that piece of water, he cast the vast fish into the sea. When the fish was thrown into the waves, he thus again spoke to Satyavrāta: ‘Here the horned sharks and other monsters of great strength will devour me; thou shouldest not, O valiant man, leave me in this ocean.’
Thus repeatedly deluded by the fish, who had addressed him with gentle words, the king said, ‘Who art thou that beguilest me in that assumed shape? Never before have I seen or heard of so prodigious an inhabitant of the waters, who, like thee, has filled up in a single day a lake a hundred leagues in circumference. Surely thou art Bhāgavat who appears before me; the great Hari, whose dwelling was on the waves; and who now, in compassion to thy servants, bears the form of the natives of the deep. Salutation and praise to thee, O first male, the lord of creation, of preservation, of destruction! Thou art the highest object, the supreme ruler, of us thy adorers, who piously seek thee. All thy delusive descents in this world give existence to various beings; yet I am anxious to know for what cause that shape has been assumed by thee. Let me not, O lotus-eyed, approach in vain the feet of a deity whose perfect benevolence has been extended to all; when thou hast shown us to our amazement the appearance of other bodies, not in reality existing, but successively exhibited.’
The lord of the universe, loving the pious man who thus implored him, and intending to preserve him from the sea of destruction caused by the depravity of the age, thus told him how he was to act: ‘In seven days from the present time, O thou tamer of enemies! the three worlds will be plunged in an ocean of death; but, in the midst of the destroying waves, a large vessel sent by me for thy use shall stand before thee. Then thou shalt take all medicinal herbs, all the varieties of seeds, and accompanied by seven saints, encircled by pairs of brute animals, thou shalt enter the spacious ark, and continue in it secure from the flood, on one immense ocean without light, except the radiance of thy holy companions. When the ship shall be agitated with an impetuous wind, thou shalt fasten it with a large sea serpent on my horn; for I will be near thee, drawing the vessel, with thee and thy attendants. I will remain. on the ocean, O chief of men, until a night of Brahmā shall be completely ended. Thou shalt then know my true greatness, rightly named the Supreme Godhead; by my favour all thy questions shall be answered, and thy mind abundantly instructed.’
Hari, having thus directed the monarch, disappeared; and Satyavrāta humbly waited for the time which the ruler of our senses had appointed. The pious king having scattered toward the east the pointed blades of the grass darbha, and turning his face towards the north, sat meditating on the feet of the god who had borne the form of a fish. The sea, overwhelming its shores, deluged the whole earth, and it was soon perceived to be augmented by showers from immense clouds. He, still meditating on the command of Bhāgavat, saw the vessel advancing, and entered it with the chiefs of Brāhmans, having carried into it the medicinal plants, and conformed to the directions of Hari. The saints thus addressed him: ‘O king, meditate on Kesava; who will surely deliver us from this danger, and grant us prosperity.’ The god being invoked by the monarch, appeared again distinctly on the vast ocean in the form. of a fish, blazing like gold, extending a million of leagues, with one stupendous horn; on which the king, as he had been before commanded by Hari, tied the ship with a cable made of a vast serpent, and, happy in his preservation, stood praising the destroyer of Madhu. When the monarch had finished his hymn, the primeval male, Bhāgavat, who watched for his safety on the greater expanse of water, spake aloud to his own divine essence, pronouncing a sacred Purāna [the ‘Matsya Purāna’], which contained the rules of the Sankhya philosophy; but it was an infinite mystery to be concealed within the breast of Satyavrāta; who, sitting in the vessel with the saints, heard the principle of soul, the Eternal Being, proclaimed by the preserving power. Then Hari, rising together with Brahmā from the destructive deluge, which was now abated, slew the demon Hayagriva, and recovered the sacred books.
Source, Translated by Sir William Jones