It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The Qur'an has been sent down in seven modes (ahruf, styles)." In the narration of Imam Abu Ya'la al-Mawsili these words are added: "Indeed the Qur'an has been sent down in seven modes, and every verse of it has an outward (apparent meaning) and an inward (hidden reality)." In another route it is reported that he (peace and blessings be upon him) said: "The Qur'an has come down in seven modes, each mode of which has an outward aspect and an inward one." In another narration from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him), he said: "The first scripture used to come down from a single gate in a single mode, and the Qur'an came down from seven gates in seven modes: restraining and commanding, lawful and unlawful, clear (muhkam) and ambiguous (mutashabih), and parables. So regard as lawful what it makes lawful, regard as unlawful what it makes unlawful, do what you have been commanded, refrain from what you have been forbidden, take lessons from its parables, act upon its clear verses, believe in its ambiguous verses, and say: {We believe in it; all of it is from our Lord}." Imam Ibn Hibban also recorded it in his Sahih. According to the narration of Imam al-Bazzar, the Messenger of Allah (peace and blessings be upon him) said: "The Qur'an has been sent down in seven modes, each mode of which has an outward and an inward." He (peace and blessings be upon him) also forbade that a man should lie on his back (the narrator said: I think he (peace and blessings be upon him) mentioned the mosque) placing one of his legs over the other.
Imam al-Bazzar said that no one narrated this hadith with these words except the narrator named al-Hajari, and that Ibn Ajlan narrated nothing from al-Hajari other than this.