After Rasulullah and the Muhajireen had settled in Madinah they now decided to build a Masjid. There was a vacant piece of land belonging to two orphans of the Najjar clan. They offered it free of charge to Rasulullah but Rasulullah refused, and bought it from them. Rasulullah 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 Nabi .
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 nor family, and they were known as Ashaabe Suffah; the residents of Suffah. Adjoining the Masjid were built two apartments for Rasulullah 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. Madinah offered an atmosphere of peace, and they could offer their Salaat without any fear or harassment in the Masjid.
Contents of the biography of the Prophet Muhammed