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:38:13

And ˹the tribe of˺ Thamud and the people of Lot and the companions of the thicket. Those are the companies.  

and Thamūd and the people of Lot and the dwellers in the wood, a small forest, namely, the people of Shu‘ayb, peace be upon him — those were the factions.
القرآن:٣٨:١٣

وَثَمُودُ وَقَوْمُ لُوطٍ وَأَصْحَابُ الْأَيْكَةِ ۚ أُولَٰئِكَ الْأَحْزَابُ  

{وثمود وقوم لوط وأصحاب الأيكة} أي الغيضة، وهم قوم شعيب عليه السلام {أولئك الأحزاب}.