It is narrated from Jabir ibn Abdullah that the Messenger of Allah (ص) said to Ali (ع):
"Do you know who was the most wretched one in the tribe of Thamūd? He said: The one who cut off the leg of Saleh’s she-camel. The Prophet (ص) asked, "Who is the most wretched one in my Ummah?" He said: Allah is (All) Knowing. The Prophet (ص) said, "The one who will kill you"
The tribe of Thamud were an unruly and haughty tribe. Their prophet, Hazrat Saleh (ع) gave them considerable counsel and advice but with no result. They asked Hazrat to perform a miracle and Hazrat, by Allah’s permission, brought out a female camel from the heart of a mountain. Instead of accepting the divine miracle, they slaughtered and killed the camel. To perform this task, they assigned a cruel and merciless person by the name of Qudar ibn Salif who, by one blow, slaughtered the camel with his sword. For this action, he earned the title of "the most wicked person of the past nations" and three days after this incident, they were destroyed by divine punishment.
Tabarani, Al-Mu’jam Al-Kabir, V.2, page 247.
Also, it is narrated from Ammar that he said: Ali ibn Abi Talib and I were friends and companions in the battle of Zhil-Ashira. The holy Prophet (s.a.w.a.) said, “Shall I inform you about two of the most miserable people?” I said, ‘Yes’. He replied: “(The redheaded man) from the tribe of Thamud, the one who slaughtered Saleh’s she-camel; and O ‘Ali! The second one is the one who shall deal a blow on your head until your beard is colored with blood.”
Suyuti, Al-Jami' as-Saghir, V.16, page 255, hadith 7864; Muttaqi Hindi, Kanz al-Ummal, V.13, page 140-141; Haithami, Majma’e al-Zavaed, V.9, page 136. As per narration of Jabir ibn Samra, refer to Kharazmi, Al-Manaqib, page 380. Ibn Kathir, Al-Bidaya wa'l-Nihaya, V.7, page 358-359; Ibn Asaker, Tarikh Madinah-Damishq, V.42, page 550.