Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:49:13

O mankind, indeed We have created you from male and female and made you peoples and tribes that you may know one another. Indeed, the most noble of you in the sight of Allah is the most righteous of you. Indeed, Allah is Knowing and Acquainted.  

O mankind! We have indeed created you from a male and a female, ˹from˺ Adam and Eve, and made you nations (shu‘ūb is the plural of sha‘b, which is the broadest category of lineage) and tribes (qabā’il, which are smaller than nations, and are followed by ‘amā’ir, ‘tribal districts’, then butūn, ‘tribal sub-districts’, then afkhādh, ‘sub-tribes’, and finally fasā’il, ‘clans’; for example Khuzayma is the sha‘b, while Kināna is the qabīla, Quraysh is the ‘imāra, Qusayy is the batn, Hāshim is the fakhdh, and ‘Abbās is the fasīla) that you may come to know one another (ta‘ārafū: one of the two tā’ letters ˹of tata‘ārafū˺ has been omitted), that you may acquire knowledge of ˹the customs of˺ one another and not to boast to one another of ˹whose is the more˺ noble lineage, for pride lies only in ˹the extent to which you have˺ fear of God. Truly the noblest of you in the sight of God is the most God-fearing among you. Truly God is Knower, of you, Aware, of your inner thoughts.
القرآن:٤٩:١٣

يَا أَيُّهَا النَّاسُ إِنَّا خَلَقْنَاكُمْ مِنْ ذَكَرٍ وَأُنْثَىٰ وَجَعَلْنَاكُمْ شُعُوبًا وَقَبَائِلَ لِتَعَارَفُوا ۚ إِنَّ أَكْرَمَكُمْ عِنْدَ اللَّهِ أَتْقَاكُمْ ۚ إِنَّ اللَّهَ عَلِيمٌ خَبِيرٌ  

{يا أيها الناس إنا خلقناكم من ذكر وأنثى} آدم وحواء {وجعلناكم شعوبا} جمع شعب بفتح الشين هو أعلى طبقات النسب {وقبائل} هي دون الشعوب وبعدها العمائر ثم البطون ثم الأفخاذ ثم الفصائل آخرها، مثاله خزيمة: شعب، كنانة: قبيلة، قريش: عمارة بكسر العين، قُصي: بطن، هاشم: فخذ، العباس: فصيلة {لتعارفوا} حذف منه إحدى التاءين ليعرف بعضكم بعضا لا لتفاخروا بعلو النسب وإنما الفخر بالتقوى {إن أكرمكم عند الله أتقاكم إن الله عليم} بكم {خبير} ببواطنكم.

See similar narrations below:

Collected by Suyūṭī
suyuti:2-508bʿMr
Request/Fix translation

  

السيوطي:٢-٥٠٨b

"عَنْ عمر إن هذه الآية في الحُجُرات: {يَاأَيُّهَا النَّاسُ إِنَّا خَلَقْنَاكُمْ مِنْ ذَكَرٍ وَأُنْثَى} هى مَكِّيةٌ، وهى للعربِ خاصةً الموالى، أىُّ قبيلة لهم، وأىُّ شعابٍ، وقوله: {إِنَّ أَكْرَمَكُمْ عِنْدَ اللَّهِ أَتْقَاكُمْ} قال: أتقاكم لِلشِّركِ".  

ابن مردويه