"And you have certainly known those among you who transgressed in the matter of the Sabbath." He says this to their scholars. "So We said to them: Be apes, despised," meaning: humiliated, according to the tafsir of al-Hasan.
Muhammad said: And it was said: 'Khası'in' (despised/repelled) means: driven away. It is said: 'Khasa'tu fulanan 'anni' (I drove such-and-such a person away from me) and 'Khasa'tu al-kalb' (I drove away the dog), meaning: I distanced them.
Yahya said: Their transgression was their taking of game on the Sabbath day, and its explanation will follow in Surah al-A'raf.