The mosques were not merely places for offering prayers, but also community centers where the faithful gathered to discuss problems of social and cultural importance. During the caliphate of Umar, as many as four thousand mosques were constructed extending from Persia in the east to Egypt in the west. Al-Masjid an-Nabawi and Masjid al-Haram were enlarged first during the reign of Umar and then during the reign of Uthman ibn Affan, who not only expanded them but also beautified them on a large scale.