On asking permission to enter and its adab

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

140. Chapter: On asking permission to enter and its adab

Allah says, "O you who believe! Do not enter houses other than your own until you have asked permission and greeted their inhabitants" (24:27)

and the Almighty says, "Once your children have reached puberty, they should ask your permission to enter as those before them also asked permission." (W24:27; H24:59)

870. Abu Musa al-Ash'ari said, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'You should ask permission to enter three times. If you are given permission, you can enter, if not, you should go back.'" [Agreed upon]

871. Sahl ibn Sa'd reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Asking permission to enter was instituted on account of the eyes." [Agreed upon]

872. Rib'i ibn Hirash said, "A man from the Banu 'Amir related to us that he asked permission to go into the Prophet, may Allah bless him and grant him peace, when he was in a house. He said, 'Can I enter?' The Messenger of Allah said to his servant, 'Go out to this person and teach him how to ask permission. Tell him to say: "Peace be upon you, can I enter?"' The man heard him and said, 'Peace be upon you, can I enter?' and the Prophet gave him permission and he entered." {Abu Dawud]

873. Kalda ibn al-Hanbal said, "I came to the Prophet, may Allah bless him and grant him peace, and went in to him without giving the greeting. The Prophet, may Allah bless him and grant him peace, said, 'Go back and say, "Peace be upon you, may I enter?"'" [Abu Dawud and at-Tirmidhi]