Matsya Avatar was the first Avatar of Lord Vishnu, among the Dashavatara (Dasavatara) or the ten principal Avatars of Mahavishnu. Matsya means ‘fish’ in Sanskrit and Matsya Avatar is the incarnation taken by Lord Vishnu in the form of Fish. According to Hindu myths, Mathsya Avatar was taken by Mahavishnu at the end of the Satyuga (last age), when the world was destroyed by a great flood. It is said that Lord Vishnu saved humanity and the holy text, Vedas, from the flood. This is the first avatar in all the Hindu literature and originated as an example for all the various incarnations of the God. Nagalapuram Veda Narayana Swamy Temple is another Matsya Avatar temple situated near Tirupati in Andhra Pradesh, India.Legend has it that the king of pre-ancient Dravida called Satyavrata, later known as Manu, was an ardent devotee of Lord Vishnu. One day, when he was washing his hands in a river, a little fish swam into his hands. It pleaded him to save its life. The king put it in a jar and it soon outgrew.Matsya asked Satyavrata to collect herbs, seeds and animals, to assemble all the seven rishis (Saptarishis) and wait. He advised to build a giant boat and fill it up with all the flora and fauna on the earth and that Lord Vishnu would meet him again at a selected time. The boat was towed by the Lord himself and tied to a horn he had manifested on his head. The huge flood occurred as expected and it destroyed the planet. However Manu and his wife and the samples of every species were safe. The havoc stopped after a few years and the boat was then towed to a land. It is said that the king and his queen started a new life using the samples of various species. They created a new life on earth.
According to Bhagavada Purana, the above story has some additions. It says that a demon named Hayagriva stole the Vedas from Lord Brahma while he was asleep and hid deep inside the ocean. In order to protect the world, Lord Vishnu incarnated as Matsya to save the world before its destruction.