Anas bin Malik reported,

The Prophet ﷺ only gouged out the eyes of those men because they had gouged out the eyes of the shepherds.

Muslim 4360

Sahih

و حدثني الفضل بن سهل الأعرج حدثنا يحيى بن غيلان حدثنا يزيد بن زريع عن سليمان التيمي

عن أنس قال

إنما سمل النبي ﷺ أعين أولئك لأنهم سملوا أعين الرعاء

مسلم 4360صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Qasama, combatants, legal retaliation, and blood money
Chapter
Ruling on those who wage war and apostates
Numbering
Darussalam 4360
Muslim 4360