In Quran 7:163–6, God punishes the inhabitants of “a town by the sea” who have collected fish from the sea on a Sabbath by transforming them into apes (qirada). Almost none of the attempts to find a precedent for this punishment in pre-Islamic texts have been plausible. This article argues that this scene reflects post-biblical traditions referring to Numbers 11:19–20. This biblical passage deals with the Israelites who consumed quails that had come from the sea; they were doomed to partake of the meat until it came out of their nostrils and became loathsome to them. This was their punishment after having expressed their discontent with the manna, while craving for meat and fish and vegetables. The midrashic sources describe various obnoxious bodily effects which the meat of the quails had on their unrestrained eaters. It will be suggested that the punitive transformation into apes, suffered by the people of the town by the sea who ate fish, represents the Quranic reshaped version of the bodily infliction which the quail eaters suffered as a result of eating the quails that came from the sea. In support of this suggestion, several points common to the biblical quail eaters and the Quranic people of the “town by the sea” will be highlighted.