jñātvā tad dānavendrasya hayagrīvasya ceṣṭitam dadhāra śapharī-rūpaṁ bhagavān harir īśvaraḥ
WORD BY WORD
TRANSLATION
Understanding the acts of the great demon Hayagrīva, the Supreme Personality of Godhead, Hari, who is full of all opulences, assumed the form of a fish and saved the Vedas by killing the demon.
PURPORT
Because everything was inundated by water, to save the Vedas it was necessary for the Lord to assume the form of a fish.