Al-Ankabut: 10
"And of the people are some who say, 'We believe in Allah,' but when they are harmed for the sake of Allah..."—meaning, for His sake, Almighty and Majestic is He. The fi (in) denotes causality, or it is intended as "in the path of Allah, the Exalted," such that when the polytheists tortured them for their belief in Him, the Exalted—"they consider the trial of the people"—meaning, they treated the harm they received from them as if it were the punishment of Allah; that is, they placed it on the level of His punishment, the Exalted, in the Hereafter. Thus, they panicked, did not endure it, obeyed the people, and disbelieved in Allah, the Exalted, just as one who fears the punishment of the Glorified obeys Allah and believes in Him, Almighty and Majestic is He.
"But if a victory comes from your Lord..."—by the believers obtaining conquest and spoils of war—"they will surely say,"—with a damma on the second lam and the omission of the plural pronoun due to the meeting of two quiescent letters; this pronoun refers back to man (whoever), and the plural is used in consideration of its meaning, just as the singular pronouns used previously were in consideration of its wording. Abu Mu'adh al-Nahwi reported that it was recited as la-yaqulanna with a fatha on the lam, consistent with the singular pronoun as in the preceding passage—"Indeed, we were with you,"—meaning, "We were your partisans in the religion, so include us in the spoils that were obtained." It is said that it means: "We were fighting alongside you, assisting you," so the intent is companionship in battle. This has been refuted on the grounds that this did not occur, and the verse was revealed regarding some of the weak Muslims who, when touched by harm from the disbelievers, would agree with them while concealing it from the Muslims. By doing so, they became hypocrites. It is for this reason that Ibn Zayd and al-Suddi said the verse is about the hypocrites. Allah, the Exalted, refuted them by His saying, the Glorified: "Is not Allah most knowing of what is in the breasts of all the worlds?"
It is, in appearance, a conjunction to an implied meaning: "Is their condition hidden? Is not...?" or, "Are not the discerning ones who look with the light of Allah knowledgeable of their conditions? Is not...?" As for a'lam (most knowing), it is either kept in its literal sense—meaning, is He not, Almighty and Majestic is He, more knowing than all the worlds of what is in the breasts of all the worlds regarding character and hypocrisy, so that He knows what they do in terms of apostasy, concealment from the Muslims, and claiming to be among them to obtain the spoils?—or it is in the sense of 'alim (Knowing).
Qatadah said: It was revealed regarding those who migrated, but the polytheists returned them to Makkah. It is also said: It was revealed regarding a group of believers whom the polytheists forced out to Badr, and they apostatized; these are the ones of whom Allah, the Exalted, said: "Indeed, those whom the angels take [in death] while they are wronging themselves..." to the end of the verse. What has preceded is the most consistent with the preceding verse and what follows it from His, the Exalted, saying: [Following verses].