After Muhammad (PBUH) and the Muhajireen had settled in Madina, they now decided to build a Masjid (Mosque). There was a vacant piece of land belonging to two orphans of the Najjar clan. They offered it free of charge to Muhammad (PBUH) but Muhammad (PBUH) refused, and bought it from them. Muhammad (PBUH) and His companions worked like ordinary workmen in the building of the Masjid. It was the proud privilege for the Sahaba to work with the beloved Prophet.
The construction of the Masjid was a very simple one. The walls were made of mud bricks and the roof was supported by the trunks of palm-trees. The leaves and twigs made up the roof itself. A platform was raised in the corner of the courtyard for the residence of such followers who had no home or family, and they were known as Ashaabe Suffah; the residents of Suffah. Adjoining the Masjid were built two apartments for Muhammad (PBUH) and His family.
The Muslims were not allowed to build a Masjid in Makkah and they were not even allowed to say their prayers in public. Madina offered an atmosphere of peace, and they could offer their Salaat without any fear or harassment in the Masjid.