The Prophet (ﷺ) said, "Do not wish to be like anyone except in two cases. (The first is) A person, whom Allah has given wealth and he spends it righteously; (the second is) the one whom Allah has given wisdom (the Holy Qur'an) and he acts according to it and teaches it to others." (Fath-al-Bari page 177 Vol. 1)
Sahih al-Bukhari 73: Commentary on the Excellence of Two Types of People
This noble hadith from the Prophet Muhammad (ﷺ) establishes the only two legitimate forms of envy (al-ghibtah) in Islam, which is to desire a blessing possessed by another without wishing for it to be taken away from them.
The First Case: The Righteous Spender
The first individual is blessed by Allah with material wealth (al-māl) and utilizes it in righteous expenditure (fi haqqihi). This encompasses fulfilling obligatory acts like zakāh, supporting family, and voluntary charity (sadaqah) that bring one closer to Allah.
Scholars explain that the virtue lies not in the mere possession of wealth, but in its correct application according to Divine Law. The wealth becomes a means of obedience, a source of ongoing reward (ajr), and a proof of gratitude (shukr) for Allah's favor.
The Second Case: The Possessor of Wisdom
The second, and superior, case is the person granted wisdom (al-hikmah), which the commentators define here as the Holy Qur'an and the authentic Sunnah. This blessing is superior to wealth, as knowledge ('ilm) guides one to Allah and benefits others.
The virtue is conditional upon three actions: acting upon this knowledge oneself ('amal), teaching it to others (ta'līm), and doing so with sincerity (ikhlās). This combination transforms knowledge from a mere intellectual pursuit into a living, guiding light for the individual and the community.
Spiritual and Legal Rulings
This hadith prohibits wishing to be like others in worldly attributes like beauty, status, or power, as this can lead to discontent with Allah's decree (qadar). It redirects the believer's aspirations toward spiritual and everlasting excellence.
It establishes the immense merit of seeking beneficial knowledge and spending righteously. It also subtly indicates the hierarchy of virtues, placing the scholar who acts upon and teaches his knowledge above the wealthy philanthropist, though both are praiseworthy paths to Paradise.