Qassama existed in the pre-Islamic era, then the Messenger of Allah ﷺ upheld it in the case of the Ansari man who was found murdered in a well belonging to the Jews. The Ansar said, "The Jews killed our companion."
أخبرنا محمد بن رافع قال حدثنا عبد الرزاق قال أنبأنا معمر عن الزهري
كانت القسامة في الجاهلية ثم أقرها رسول الله ﷺ في الأنصاري الذي وجد مقتولا في جب اليهود فقالت الأنصار اليهود قتلوا صاحبنا
No references are available.
[Sahih] See the two preceding hadiths. It is also in Sunan al-Kubra, hadith 6912.