All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
Scholars of Tafseer (exegesis) interpreted this verse as to denote a command (religious ruling) and not as a report. It means that whoever enters the Sacred House of Allah must be granted protection by Muslims and that it is impermissible to transgress against him. Al-Jassaas commented on these verses, saying:
"Allah, The Exalted, says (what means): {And (mention) when We made the House a place of return for the people and (a place of) security.} [Quran 2:125] This verse is a commandment from Allah in this regard and not a report. Thus, it means: give protection to whoever enters it. The same applies to the verse: {And (mention) when Ibraaheem (Abraham) said: My Lord, make this a secure city...} [Quran 2:126] and: {And whoever enters it shall be safe.} [Quran 3: 97] These verses underline the divine command in this regard and are not a report indicating that whoever enters the Sacred House would be inevitably safe. Had it been a report and not a command, it would have been an established fact and an inevitable case because the statement of Allah is a fact that must be true as stated by Him..."
He also wrote:
"Allah, The Exalted, says (what means): {And do not fight them at Al-Masjid Al-Haraam until they fight you there. But if they fight you, then kill them.} [Quran 2:191] This verse states that killing may take place there, and thus it indicates that security in it is in terms of granting protection and security to whoever seeks refuge in it. This was the religious ruling since the time of Prophet Ibraaheem, may Allah exalt his mention. Arabs used to honor the Sacred House during the pre-Islamic era and regarded killing in it as a grave and hideous act, acting upon what remained in their hands of the Sharia of Ibraaheem, may Allah exalt his mention."
Allah knows best.