Soon after arriving in Madina, the noble Messenger (pbuh) and his companions embarked on building the masjid. It was a modest structure and measured no more than 98 ft x 115 ft, having mud walls raised over stone foundations. The roof was made of trunks and branches of date palm trees. Only a portion of the masjid had a roof to protect attendees and participants from the Sun. The Prophet (pbuh) personally took part in its construction. On the south side there was also a bench that served as the place for Ahl al-Suffah, the poorest of the poor companions who had no homes, and were supported by the Prophet (pbuh). There were three doors to the rectangular enclosure: Bab al-Rahmah (The Door of Mercy) to the south; Bab Jibril (Door of Gabriel) to the west, called thus because the Prophet (pbuh) had received revelation near it, and Bab al-Nisa (Door of the Women) to the east.