Holy Prophet Muhammad (SAWA) ordered closure of doors of the houses of those companions that opened into Masjid an-Nabi (SAWA)
On 9th of the Islamic month of Zil-Hijjah by the commandment of God, Holy Prophet Muhammad (SAWA) ordered closure of doors of the houses of those companions that opened into the Grand Mosque of Medina (Masjid an-Nabi), except that of his own house and that of Imam Ali (AS), as a measure to protect the mosque\’s sanctity, from possible pollution by the Sahaba who might enter in the state in which it is forbidden to enter a mosque.
When certain companions grumbled at this, he said: Indeed, God had ordered His Prophet Moses to build a holy Mosque, and he allowed Moses, Aaron and the two sons of Aaron, viz. Shabar and Shubair, to live therein. I was likewise ordered to construct a holy mosque wherein myself and my brother Ali and his two sons, Hasan and Husain, are allowed to live. Surely, I do only what I am ordered to do. I never undertake to act on my own wish. Certainly I have not ordered of my own accord to close your doors or to let Ali\’s door remain open. It is God who granted Ali an abode in the Holy Mosque.
This event has been mentioned in the Sahih books of the Sunni compilers of hadith, such as Bukhari, Tirmizi, etc. The 2nd caliph, Omar Ibn Khattab, has been quoted as saying: “Indeed, Ali has been endowed with three qualities, of which had I but one, it would be more precious to me than to be given high bred camels.” It was asked of him what they were? He replied “His marriage to Fatema (the Prophet’s daughter); his remaining in the Mosque while that is not lawful for me; and his carrying the Standard on the day of Khaibar.”
On 13th of the Islamic month of Zil-Hijjah in the year preceding the hijrah, or the historical migration of the Prophet of Islam to Medina, the Second Pledge of Aqaba took place, when a group of Muslims from Medina and other places came to Mecca to reaffirm their allegiance to Islam. This pledge followed the First Pledge of Aqaba that ended the long feud between the tribes of Ows and Khazraj, through the mediation of the Prophet, thereby winning fresh adherents to Islam. After the Second Pledge of Aqaba, the people of Medina invited the Prophet to leave Mecca and come to their city. The Prophet\’s migration, on divine command, a year later, was a turning point in human history and opened a new chapter in the spread of Islam.