The first project in Madinah was the mosque, built of mud brick and palm trunks, with the Prophet ﷺ carrying bricks alongside his companions. It became the centre of worship, learning and community life.
He joined the emigrants from Makkah (the Muhajirun) with the Muslims of Madinah (the Ansar) in a pact of brotherhood. The Ansar shared their homes and wealth, and the Quran praises them for preferring others over themselves (59:9).
He agreed a written charter with the communities of Madinah, including its Jewish tribes, setting out mutual rights and obligations and the defence of the city.
About sixteen or seventeen months after the Hijrah, the qiblah was changed from Jerusalem to the Kaʿbah (2:144). The adhan was established to call people to prayer, and Bilal, with his beautiful voice, became its first caller.