The delegation calling from behind the chambers
1–5
According to the reports, a delegation of the Banu Tamim came to Medina and shouted from behind the Prophet's chambers, “O Muhammad, come out to us!”; the verse “Most of those who call you from behind the chambers do not use reason” was revealed about them. As narrated in Bukhari, the opening verses of the sura came down when Abu Bakr and Umar raised their voices in dispute before the Prophet over whom to appoint as leader for this delegation; it was commanded, “Do not raise your voices above the voice of the Prophet.” It is narrated that thereafter Umar spoke in the Prophet's presence only in a low voice.
Buhârî 4845-4847; Tirmizî 3266
Revelation context of the surah
Surah-wide
Al-Hujurat is Medinan, dated to the late Medinan period, largely around the Year of Delegations (9 AH). According to reports, some of its verses came down when the delegation of Banu Tamim called out rudely from outside the Prophet's chambers (hujurat). It regulates etiquette toward the Prophet and social ethics such as mockery, backbiting and suspicion.
Buhârî rivayetleri; klasik tefsir mukaddimeleri