[6] He was the son and successor of Sultan Abu al-Hasan, under whose reign the Marinid empire reached its apogee and expanded all the way to Tunis in the east.
[7][5] Abu Inan, who rebelled against his father and declared himself sultan in 1348, did not manage to hold onto all these new eastern territories, but the Moroccan state was nonetheless prosperous during his reign.
[7] His death marked the beginning of the dynasty's definitive decline, with subsequent Marinid rulers being mostly figureheads controlled by powerful viziers.
[7] The Marinids were prolific builders of madrasas, a type of institution which originated in northeastern Iran by the early 11th century and was progressively adopted further west.
They used this patronage to encourage the loyalty of Fes's influential but fiercely independent religious elites and also to portray themselves to the general population as protectors and promoters of orthodox Sunni Islam.
[1]: 474 [8]: 197 The inscription also notes an extensive list of mortmain-type endowments (i.e. properties and other sources of revenue) which were dedicated to funding the madrasa's operations and which were part of its habous or waqf (an Islamic charitable trust).
"[6][2] Despite Sultan Abu Inan's significant investments in the madrasa's architecture and its waqf endowment, it does not appear to have successfully rivaled the prestige and importance of the larger and older Qarawiyyin as a center of learning.
It operated autonomously for some time but it's likely that after a couple of centuries the privilege of higher education in Fes was de facto centralized through the Qarawiyyin.
Directly above the doorway is a wooden lintel carved with an Arabic inscription that names Abu Inan as the madrasa's founder.
The courtyard is surrounded on three sides by a narrow gallery, partially hidden by wooden screens between the pillars that uphold the walls of the floor above.
[2][4][3] At the northwestern and northeastern corners of the building are stairways that lead to an upper floor which is occupied by more living quarters for students, some of which have windows overlooking the courtyard.
[4][1] They are entered via archways with intricate muqarnas-carved intrados, which are guarded by tall cedar wood doors whose surfaces are finely carved with interlacing geometric star patterns with arabesque fillings as well as with bands of Arabic calligraphic inscriptions.
The room, open to the rest of the prayer hall via a double-arched window, is elevated above the doorway that gives access to the madrasa's rear street entrance.
The four facades of the minaret are covered by slightly different variations of the darj wa ktaf motif (vaguely similar to a fleur-de-lys or palmette shape) common to Moroccan architecture.
The lower walls and pillars are covered in elaborate zellij mosaic tilework forming complex geometric patterns, while a band of epigraphic or calligraphic tiles in a sgraffito-style[14] runs above this along most of the courtyard.
[2][3][4] The cedar wood doors to the lateral chambers on the northeast and southwest sides of the courtyard are also finely carved, featuring bands of Arabic calligraphy and mostly covered with an with interlacing geometric star pattern with arabesque fillings.
Opposite the main doorway of the madrasa is the entrance to the dar al-wuḍūʾ ("house of ablutions") for washing limbs and face before prayers.
[3] Also opposite the Madrasa Bou Inania is the Dar al-Magana, a house whose street facade features a famous but not fully understood hydraulic clock.
The symbolic and practical importance of a clock lay in its use for determining the correct times of prayer, and the system was overseen by the mosque's muwaqqit (timekeeper).
The structure is believed to have also been built by Abu Inan alongside his madrasa complex, with one chronicler (al-Djazna'i) reporting that it was completed on May 6, 1357 (14 Djumada al-awwal, 758 AH).
[15] The facade of the building has 13 consoles (corbels) intricately carved in cedar wood, with panels of wood-carved arabesques and stylized Kufic decoration between them.
[15][3] Historical accounts describe how at every hour a lead ball or weight fell into one of the bowls to make a ringing sound, while at the same time opening the "doors" or shutters of the corresponding window.
It was likely powered in some way by running water, and it appears the weights or balls may have been suspended by a lead line attached to the projecting consoles above the windows.