Allah, the Exalted, said:
٢٧٩ - باب النهي عن الافتخار والبغي
Allah, the Exalted, said:
Those who avoid the major sins and immoralities, only [committing] slight ones. Indeed, your Lord is vast in forgiveness. He was most knowing of you when He produced you from the earth and when you were fetuses in the wombs of your mothers. So do not claim yourselves to be pure; He is most knowing of who fears Him.
And the Exalted also said:
The cause is only against the ones who wrong the people and tyrannize upon the earth without right. Those will have a painful punishment.
And on the authority of ʿIyāḍ ibn Ḥimār (may Allah be pleased with him), who said: The Messenger of Allah (ﷺ) said: "Allah, the Exalted, has revealed to me that you are to be humble towards one another, so that no one transgresses against another, nor does anyone boast over another." Muslim narrated it. The scholars of the language said: al-baghy means overstepping the bounds and overbearing arrogance over others.
And on the authority of Abū Hurayrah (may Allah be pleased with him): that the Messenger of Allah (ﷺ) said: "When a man says, 'The people are ruined,' then he is the most ruined of them." Muslim narrated it. The well-known reading is «ahlakuhum» with the kāf in the nominative, and it is also narrated with it in the accusative («ahlakahum»). That prohibition applies to whoever says it out of conceit with himself, belittling the people, and exalting himself over them — this is what is forbidden. But as for one who says it on account of a deficiency he sees in the people regarding their religion, saying it out of grief for them and for the religion, there is no harm in it. Thus the scholars explained and elaborated it. Among the eminent imams who said this are Mālik ibn Anas, al-Khaṭṭābī, al-Ḥumaydī, and others; I have set it out clearly in the book al-Adhkār.