What is the ruling on carrying out qisas or a hadd punishment in the Haram?
Shedding blood and carrying out a hadd punishment in the Haram is not permissible, until the one who sought refuge leaves the Haram.
[For details see: Al-Mughni: 413/12, Bidayat al-Mujtahid: 405/2, Hashiyat Ibn Abidin: 625/3, Al-Umm by al-Shafi’i: 290/4, Nayl al-Awtar: 482/4]
As for a person who commits, inside the Haram, an act that makes him liable to a hadd punishment or qisas, according to some of the people of knowledge he is to be taken outside the Haram and punished. However, it is narrated from Ibn Abbas (may Allah be pleased with them both) that:
من سرق أو قتل فى الحرم أقيم عليه فى الحرم
“Whoever steals or kills in the Haram, the hadd punishment will be carried out against him in the Haram itself.”
[Abd al-Razzaq: 304/9, 17306, Bayhaqi: 214/9]
(The preponderant view) In the hadiths there is an absolute prohibition on shedding blood or carrying out a hadd punishment in the Haram, whether the person is someone who came there seeking refuge or committed, inside the Haram itself, an act that makes him liable to a hadd punishment or qisas. And this verse:
وَلَا تُقَاتِلُوهُمْ عِندَ الْمَسْجِدِ الْحَرَامِ حَتَّىٰ يُقَاتِلُوكُمْ فِيهِ [Al-Baqarah: 191]
“And do not fight them near the Sacred Mosque until they fight you in it.”
only indicates the permissibility of defence at the time of fighting.
[Nayl al-Awtar: 483/4]