Hadith 204

وعنها : أن وليدة سوداء كان لها خباء في المسجد فكانت تأتيني فتحدث عندي . . الحديث. متفق عليه
Narrated ['Aishah (RA)]: One black slave-girl had a tent in the mosque and she used to come to me and talk (with me) in my house. [Agreed upon].
Hadith Reference بلوغ المرام / 204
Hadith Grading محدثین: صحيح
Hadith Takhrij «أخرجه البخاري، الصلاة، باب نوم المرأة في المسجد، حديث:439، ومسلم: لم أجده بسند البخاري.»
Related hadith on this topic
Explanation & Benefits
Shaykh Safi ur-Rahman Mubarakpuri
204 Lexical Explanation:
«وَلِيدَةً »: Slave-girl.

«خِبَاءٌ»: The letter "kha" has a kasrah underneath, and the "ba" is in its light (mukhaffaf) form. It is used in the meaning of "tent."

«فَتَحَدَّثُ »: Originally, it was «تَتَحَدَّثُ». It is in the meaning of «تَتَكَلَّمُ », that is, she used to come for conversation and discussion.

It is established from the hadith that a woman can also spend the night in the mosque, provided there is no fear of fitnah (temptation or discord) or corruption, and for her, a tent can also be set up in the mosque. This is an excerpt from a lengthy hadith. The complete hadith is found in Sahih al-Bukhari.
Source: Bulugh al-Maram: Commentary by Safiur Rahman Mubarakpuri, Page: 204
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
1.
Imam Bukhari rahimahullah has established two chapters one after the other: (1) A woman sleeping in the mosque, (2) A man sleeping in the mosque. The purpose of this is to clarify permissibility, as is evident from the narrations. However, Imam Bukhari rahimahullah gave precedence to "a woman sleeping" because a woman is a source of temptation (fitnah). For this reason, according to some of the esteemed Imams, it is absolutely prohibited for a woman to sleep in the mosque, even if she is elderly, as is transmitted from Imam Malik rahimahullah. In view of this misconception, he gave it precedence in order to clarify the permissibility. And this permission is due to an emergency necessity. Shah Waliullah Muhaddith Dehlawi rahimahullah states:
"It is permissible for a woman to sleep in the mosque, even if there is a possibility that she may begin menstruating (hayd), but when she actually begins menstruating, she should leave the mosque. Before that, her sleeping in the mosque is not prohibited."
(Sharh Tarajim Bukhari: )

2.
Hafiz Ibn Hajar rahimahullah has derived the following rulings from this hadith:
➊ Any Muslim man or woman who has no place to stay may take shelter in the mosque, provided there is no fear or danger there.
➋ It is permissible to arrange a tent or some other form of shade in the mosque.
➌ If someone fears moral or religious corruption in a country, it is permissible to migrate to another country.
➍ The virtue of migrating from the land of disbelief (dar al-kufr) is evident.
➎ The supplication of the oppressed is certainly accepted, even if the oppressed is a disbeliever.
(Fath al-Bari: 1/692)

3.
It should be noted that the tent of this newly converted slave woman was set up in the northern part of the Prophet’s Mosque (Masjid Nabawi), a section of which was reserved for the People of the Bench (Ashab al-Suffah), and after the change of the qiblah, it was used as the courtyard of the mosque. At most, such incidents can be considered as concessions (rukhsah).
And Allah knows best.
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 439