The Maghreb Republic dates back as far as the mid-15th century, when Mohammed ash-Sheikh overthrew the ruling Wattasid dynasty and established himself as the Sultan of Morocco. Over the next several decades, he and his sons secured their control over Morocco, conquered the remnants of the Fatamid Caliphate in Algeria, and ultimately subdued the wealthy Songhai and Mali Empires in West Africa. Attempts to expand the jungles of Central Africa were not successful, however.
Though the wealth brought from the gold and salt mines of West Africa kept the Moroccan Empire afloat for the next century, it began to decline in the late 1700s as the logistics of maintaining the sprawling trans-Saharan empire began to wear on the increasingly weak Sultans. The government found its grip on the West African territories loosening over the next century and a half, the decay hitting its pinnacle in the early 19th century, when the Songhai declared their independence. Morocco, too weak to put down the rebellions, accepted this, sparking some territories of the former Malinese Empire to declare their independence as well. The remainder of Moroccan West Africa was lost over the next few decades as the territories fractured into countless nations.
The loss of this vast stretch of rich territory destroyed what little prestige Morocco still had. With deep-seated dissatisfaction at home, the young Sultan Muhammed Al-Hassani, in an attempt to reclaim former glory, kicked off a massive effort to westernize in 1867. Though technologically the effort met with moderate success (with some minor industrialization occurring in the larger cities), socially it was far from successful, and indeed led to the threat of the territory of Algeria seceding. To avoid this disastrous occurrence (and an outright revolution by those favoring a republican form of government), in 1886 the Sultan accepted the adoption of a Western-style constitution. Upon its adoption, and in what was widely viewed as a move to placate the Algerians, the official name of the country was changed from the Moroccan Empire to the Maghreb Republic, though for all practical purposes there was no difference between the two nations.
As of 1900, power in the parliament is largely concentrated in the hands of those who support the current state of affairs. A more right-wing party, desiring to maintain the republic but change it to be more in-line with traditional Islamic law, holds a few seats. Additionally, a vocal minority exists consisting of those supporting the complete abolition of the office of Sultan and conversion of the nation into a "pure" republic (complete with the extension of the franchise to women and a multitude of other modern, and in the view of much of the populace corrupting, ideas); they hold all of one seat