His statement: "There has certainly been for you in them a good pattern" - the verse - refers back to His statement: "There has certainly been for you a good pattern in Abraham." God commanded His Prophet and the believers to disassociate themselves from their people as long as they remained disbelievers, just as Abraham and those with him disassociated themselves from their people. Thus, the believers severed their alliance with the people of Mecca and manifested enmity toward them. He said: "And whoever turns away" from faith, "then indeed, Allah is the Free of need" of His creation, "the Praiseworthy" - He has entitled Himself to their praise.
قَوْله: ﴿لَقَدْ كَانَ لَكُمْ فِيهِمْ أُسْوَة حَسَنَة﴾ الْآيَة رَجَعَ إِلَى قَوْله: ﴿قَدْ كَانَتْ لَكُمْ أُسْوَةٌ حَسَنَةٌ فِي إِبْرَاهِيم﴾ فَأمر اللَّه نبيّه وَالْمُؤمنِينَ بِالْبَرَاءَةِ من قَومهمْ مَا داموا كفَّارًا؛ كَمَا برِئ إِبْرَاهِيم وَمن مَعَه من قَومهمْ؛ فَقطع الْمُؤْمِنُونَ ولايتهم من أهل مَكَّة، وأظهروا لَهُم الْعَدَاوَة قَالَ: ﴿وَمن يتول﴾ عَن الْإِيمَان ﴿فَإِنَّ اللَّهَ هُوَ الْغَنِيّ﴾ عَن خلقه ﴿الحميد﴾ اسْتوْجبَ عَلَيْهِم أَن يحمدوه