Srimad Bhagavatam Canto 08, Chapter 24, Text 09

SB 8.24.9

jñatva tad danavendrasya
 hayagrivasya cestitam
dadhara saphari-rupam
 bhagavan harir isvarah
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Understanding the acts of the great demon Hayagriva, 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 by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Because everything was inundated by water, to save the Vedas it was necessary for the Lord to assume the form of a fish.
Srimad Bhagavatam Canto 08, Chapter 24, Text 08
Srimad Bhagavatam Canto 08, Chapter 24, Text 10