(Allah has made this city a sanctuary since the day He created the heavens and the earth. So, it is a sanctuary by Allah's decree till the Day of Resurrection. Fighting in it was made legal for me only for an hour in the daytime. So, it (i.e., Makkah) is a sanctuary, by Allah's decree, from now on until the Day of Resurrection. Its trees should not be cut, and its grass should not be uprooted. If anyone mentions the fighting in it that occurred by Allah's Messenger, then say that Allah allowed His Messenger, but did not allow you.)

In this Hadith, Allah's Messenger mentions fighting the people of Makkah when he conquered it by force, leading to some deaths among the polytheists in the area of the Khandamah. This occurred after the Prophet proclaimed:

(...unless they (first) fight you there. But if they attack you, then kill them. Such is the recompense of the disbelievers.)

Allah states: `Do not fight them in the area of the Sacred Mosque unless they start fighting you in it. In this case, you are allowed to fight them and kill them to stop their aggression.' Hence, Allah's Messenger took the pledge from his Companions under the tree (in the area of Al-Hudaybiyyah) to fight (the polytheists), after the tribes of Quraysh and their allies, Thaqif and other groups, collaborated against the Muslims (to stop them from entering Makkah to visit the Sacred House). Then, Allah stopped the fighting before it started between them and said:

(Had there not been believing men and believing women whom you did not know, that you may kill them and on whose account a sin would have been committed by you without (your) knowledge, that Allah might bring into His mercy whom He wills ـ if they (the believers and the disbelievers) had been apart, We verily, would have punished those of them who disbelieved with painful torment.) (48:25)

Allah's statement:

[فَإِنِ انتَهَوْاْ فَإِنَّ اللَّهَ غَفُورٌ رَّحِيمٌ ]

(But if they cease, then Allah is Oft-Forgiving, Most Merciful.) which means, `If they (polytheists) cease fighting you in the Sacred Area, and come to Islam and repent, then Allah will forgive them their sins, even if they had before killed Muslims in Allah's Sacred Area.' Indeed, Allah's forgiveness encompasses every sin, whatever its enormity, when the sinner repents it.