“Does not Allah know best what is within the breasts of all beings?”—that is, their faith and hypocrisy.
“And Allah will surely make evident those who believe, and He will surely make evident the hypocrites. (11) And those who disbelieve say to those who believe, ‘Follow our way, and we will bear your sins.’ Yet they will not bear any of their sins at all. Indeed, they are liars. (12)”
“And Allah will surely make evident those who believe”: those who were sincere and remained steadfast upon Islam when affliction came; “and He will surely make evident the hypocrites”: by their abandoning Islam when affliction descended.
They differed concerning the occasion of this verse’s revelation. Mujahid said: “It was revealed concerning people who professed faith with their tongues, but when they suffered harm from people or a calamity in themselves, they succumbed to the trial.” (1) Ikrimah related from Ibn Abbas, may Allah be pleased with him, that it was revealed concerning those whom the idolaters brought out to Badr, (2) and it was they concerning whom the following was revealed: “Indeed, those whose souls the angels take while they had wronged themselves” (al-Nisa 4:97). Qatadah said: “It was revealed concerning the people whom the idolaters forced back to Mecca.” (3) Al-Sha‘bi said: “These ten verses, from the beginning of the surah to this point, are Medinan; the remainder of the surah is Meccan.” (4)
“And those who disbelieve say to those who believe, ‘Follow our way.’” Mujahid said: “This was said by the disbelievers of Mecca to those among them who had believed.” Al-Kalbi and Muqatil said: “Abu Sufyan said it to those of Quraysh who had believed: ‘Follow our way’—our religion and the creed of our forefathers—and we will guarantee every consequence from Allah that may befall you.” This is indicated by His saying: “And we will bear your sins,” that is, your burdens.
Al-Farra’ said: “Its wording is an imperative, but its meaning is conditional.” (5) That is: if you follow our way, we will bear your sins—like His saying: “Then let the river cast him upon the shore” (Ta-Ha 20:39). It was also said that it is a jussive form expressing a command, as though they had commanded themselves to do so. But Allah, exalted is He, declared them liars, saying: “Yet they will not bear any of their sins at all. Indeed, they are liars”—in their claim that they would bear their sins.