God says
As for that (happy) life in the hereafter, We grant it to those who do not seek to exalt themselves on earth, nor yet to spread corruption: for the future belongs to God-conscious.*-- Q.28: 83
* The last clause makes it clear that, in order to have spiritual value, man’s “not seeking” worldly grandeur of self-indulgence in things depraved must be an outcome, not of indifference or of a lack of opportunity, but solely of a conscious moral choice.
…do not, then, consider yourselves pure – [for] He knows best as to who is conscious of Him.* -- Q.53: 32
i.e., “never boast your own piety”, but remain humble and remember that “it is God who causes whomever He wills to remain pure” (4:49)
Prophet said
1. When asked: Is it party-spirit that a man loves his own people? “No,” said the Prophet, “but it is party-spirit that a man helps his people in wrong-doing.” – H: Ahmed and Ibn Majah. N: Ubadah- Kasir.
2 “Whoever helps his people in an unjust cause is like a camel which falls in a well and is pulled by his tail.” -- H: Abu Daud. N: Ibn Masud.