The Holy Qur'an says:
And (O Muhammad) ask them about the (people of the) town which was beside the sea; when they exceeded (the limits) in the Sabbath when their fish came to them on the day of their Sabbath, appearing on the surface of the water; and on the day they did not observe the Sabbath, they (the fish) did not come unto them. Thus did We try them, for they were transgressing. And when a part of them said, "Why do you preach to those whom Allah would destroy or punish by a severe torment?" They replied, "To be free from blame before your Lord, so that perhaps they may become pious." (Quran 7:163-164)The fishermen were tempted by the easy catches to be made on Saturday and they thought of a plan to get around the Divine restriction. They decided to dig trenches and canals to divert the fish. On Saturdays, the canals were opened and the fish would swim into them in large numbers. At night, before the fish could return back to the sea, the canals were dammed. Then on Sundays the fishermen would easily catch all the trapped fish.
The wise and pious people of the tribe advised these greedy fishermen not to violate the command of Allah . They considered it their duty to guide those who were in error, because otherwise they would also be to blame for the consequences. However, the fishermen continued disobeying the Divine commandment and even boasted about their cleverness.
Finally, the punishment of Allah came down and their faces were transformed into those of animals. After three days and nights all the sinners were destroyed. The Holy Qur'an says:
And indeed you know of those amongst you who transgressed on the Sabbath, so We said unto them, "Become apes, despised and spurned!" And We made it a lesson for (those of) their own times and those (of their posterity) who came after them and a guidance for those who guard against evil. (Quran 2:65-66)(Courtesy of:- Shia Ithna asheri Madressa)