Al-Israa • EN-TAFSIR-IBN-ABBAS
﴿ وَإِن كَادُوا۟ لَيَفْتِنُونَكَ عَنِ ٱلَّذِىٓ أَوْحَيْنَآ إِلَيْكَ لِتَفْتَرِىَ عَلَيْنَا غَيْرَهُۥ ۖ وَإِذًۭا لَّٱتَّخَذُوكَ خَلِيلًۭا ﴾
“AND,. behold, they [who have gone astray] endeavour to tempt thee away from all [the truth] with which We have inspired thee, [O Prophet,] with a view to making thee invent something else in Our name - in which case they would surely have made thee their friend!”
(And they indeed strove hard) they almost succeeded (to beguile thee (Muhammad) away) to drive you away and make you slip (from that wherewith We have inspired thee) regarding the breaking of their idols, (that thou shouldst invent) that you should say (other than it against Us) other than what We commanded you to do: breaking their idols; (and then would they have accepted thee as a friend) because of following them. This verse was revealed about Thaqif.