The practice of performing the obligatory prayers in different congregations (salat al-jama a) within the Masjid al-Haram is a tradition that, based on the available evidence, dates back to the late 5th century of the Hijri calendar and remained uninterrupted for over eight and a half centuries, continuing until 1344/1926. Although it is not possible to precisely date the beginning of this practice, the existing data suggests that it emerged in the second half of the 5th century. This period corresponds with the restoration of Abbasid control over the Hejaz, following a century-long dominance by the Fatimids. The earliest information on the practice indicates that, out of the four congregations representing different schools of law, three were Sunni, and one followed the Zaydi madhhab. The presence of the Hanbali congregation, the fourth Sunni school, can be estimated for the first decades of the 6th century, indicating that the practice evolved gradually. This also suggests that the local rulers of Mecca, who adhered to the Zaydi school, played a role in shaping if not initiating the practice. Although later scholars such as Tujibi (d. 730/1329) and, in a similar vein, Zarkashi (d. 794/1392)-- writing more than two centuries after the practice began--tend to attribute its origins to lack of a Sunni authority or to the attitude of the local Zaydi rulers of Mecca respectively, earlier accounts, particularly those from Ibn al-Jabbab (d. 555/1160), suggest that the introduction of the four Sunni congregations was in fact a directive from the Abbasid Caliph. Since the beginning of the practice, the Shafii imam, and thus the Shafii congregation, held a privileged position by leading prayers behind Maqam Ibrahim and being the first to commence the prayers. The positioning of the congregations at different sides of the Kaaba helped prevent the mixing of the sounds to some extent, and differing opinions among the legal schools about the optimal time for prayers allowed for further temporal adjustments to ensure the tranquility of the worship. However, the short time window for the Maghrib (evening) prayer was the cause of a much-criticized issue in this arrangement. It seems that the Shafii school's privileged position, even during the Maghrib prayer when all congregations performed it simultaneously, remained largely intact with a symbolic priority until the Ottoman period. At that time, in a decision driven primarily by political considerations--though not without legal justification-- the Hanafi congregation was given the honor of leading and completing the Maghrib prayer first. Although the origins of this practice can be traced to the political context, with the Abbasids likely using it to assert their legitimacy as the rightful leaders of the Sunni world following their victory over the Fatimids in the struggle for hegemony over the Hejaz, it is equally evident that the legal discourse of the period played a crucial role in shaping and initiating this arrangement. The prevailing debates on the permissibility of praying behind an imam from a different school of law suggest that legal doctrines rendered this regulation a necessary and inevitable solution to the issue of congregational prayers in the most sacred space, for which no alternative existed. As a result, the idea that the Masjid al-Haram, under the discretionary authority of the caliph, can be regarded as separate mosques did not provoke significant opposition. It seems that strong objections only emerged when evening prayers began to be performed by all congregations of different madhhabs simultaneously, at which point critics began voicing their opposition to the very essence of the arrangement. Despite being criticized at different times the practice remained in place. The legal discussions and fatwas related to the issue can be divided into two phases, based on the time and focus of the debate. The first phase begins with treatises or fatwas written in 550/1155 A.H. by Ibn al-Jabbab (d. 555/1160) and al-Gassani, with Ibn al-Jabbab identified as a Maliki scholar from Fatimid-era Egypt. These works represent the earliest known critique of the practice. Responses to Ibn al-Jabbab's critiques were issued by Maliki scholars in Alexandria in the early 7th century. These texts, which address the legitimacy of the practice, were later referenced by Meccan scholars in the 9th and 10th centuries. The second phase of the debate not covered in this study took place in the latter half of the 10th century. This phase primarily involved Hanafi scholars, such as Rahmatullâh al-Sindi (d. 993/1581), Amir Padishâh (d. after 998/1581), and 'Ali al-Qâri (d. 1014/1605), who concentrated on how a Hanafi follower should navigate the now well-established practice, without directly questioning its legitimacy. [ABSTRACT FROM AUTHOR]