Sahih Bukhari, Volume 1, #234
Narrated Abu Qilaba:
Anas said, "Some people of 'Ukl or 'Uraina tribe came to Medina and its climate did not suit them. So the Prophet ordered them to go to the herd of (Milch) camels and to drink their milk and urine (as a medicine). So they went as directed and after they became healthy, they killed the shepherd of the Prophet and drove away all the camels. The news reached the Prophet early in the morning and he sent (men) in their pursuit and they were captured and brought at noon. He then ordered to cut their hands and feet (and it was done), and their eyes were branded with heated pieces of iron. They were put in 'Al-Harra' and when they asked for water, no water was given to them." Abu Qilaba said, "Those people committed theft and murder, became infidels after embracing Islam and fought against Allah and His Apostle."
Bukhari, Volume 2, #577
Some people from 'Uraina tribe came to Medina and its climate did not suit them, so Allah's Apostle allowed them to go to the herd of camels (given as Zakat) and they drank their milk and urine (as medicine) but they killed the shepherd and drove away all the camels. So Allah's Apostle sent (men) in their pursuit to catch them, and they were brought, and he had their hands and feet cut, and their eyes were branded with heated pieces of iron and they were left in the Harra (a stony place at Medina) biting the stones.
Essentially the same hadith is found also in Bukhari 5.505, 7.623, and 8.797.
These people (eight of them according to other sources) killed Muhammad's shepherd. The death penalty for cold blooded murder is certainly defensible. No question that they can be put to death for this crime.
But is torture not wrong?
If torture is wrong and against human dignity in principle then it should not be done. Two wrongs do not make a right.
What is gained by brutality and torturing anyone to death? The state and judiciary have only the duty to protect from evil and punishing these evil people by killing them for their crime is all the protection detering that is necessay.
Other sources state that these men might have killed the shepherd cruelly as well. (Though these sources might already contain embellishments to justify Muhammad's punishment somehow). But the question is if the state has the mandate or duty to give "equal punishment" to a criminal beyond the death penalty. Full justice is only in divine justice and should be left to God. We do not ever know all the details necessary to make a fully just judgment. With the death penalty and execution, justice on the human level is served, the society is protected from further evil and complete justice should be left to God's last judgment.
One might also wonder: Did all of them deserved equal punishment? Did Muhammad inquire if any of them was not part of the torture and killing itself or even tried to keep the others from doing this? Muhammad makes a summary execution and they seem to be all put to death indiscriminately without much of any investigation.
However, the main issue is how this excessive cruelty reflects on Muhammad. Can he truly be a model of mankind and spokes man for a merciful God when acting in such a cruel and vindictive manner?
More details on the above incident from other sources
Muhammad and his enemies
Answering Islam Home Page