Bab El-Magana serves as a rare surviving example of 14th-century hydraulic engineering, located directly across from the Bou Inania Madrasa on the Rue Talaa Kebira in Fes. Built in 1357 AD, this monumental water clock functioned through a complex system of weights and water flow that signaled the hours for prayer. Visitors often walk right past the wooden beams and brass bowl supports without realizing they are looking at one of the most advanced mechanical devices of the medieval Islamic world. The structure remains integrated into the facade of a house, which traditionally belonged to the clockmaker or the mosque timekeeper. Most tourists focus on the ornate carvings of the madrasa entrance, but pausing for five minutes at the clock facade reveals the subtle ingenuity of Marinid craftsmanship that the main crowds typically ignore.
Sultan Abu Inan Faris commissioned the construction of this clock as part of his larger project to establish the Bou Inania Madrasa as a primary center of learning and religious life in Morocco. Historical records indicate the project reached completion on May 11, 1357, which was the 14th of Jumada al-Ula in the year 758 of the Islamic calendar. The primary designer was a muwaqqit, or professional timekeeper, named Abou al-Hassan Ibn Ali al-Fasasi. This role was crucial in medieval Fes because the city relied on precise astronomical calculations to determine the exact moments for the five daily prayers. Unlike simpler sundials used in other parts of the city, this hydraulic machine provided a way to track time even on cloudy days or during the night.
The physical structure consists of 13 large cedar wood beams that protrude from the wall, each originally supporting a brass bowl. Above these beams, thirteen small windows or apertures were built into the masonry. These openings likely housed the mechanical triggers that released metal balls into the bowls to chime the hour. The use of Atlas cedar was intentional, as this wood is naturally resistant to the high humidity levels often found in Moroccan hydraulic systems. While the brass bowls are no longer in their original positions—many having been moved for safekeeping or study—the remaining wooden supports still show the square notches where the metal components were once anchored. Finding the site can be tricky because the medina walls are dense; look for the high beams directly opposite the massive green-tiled entrance of the madrasa.
The internal workings of Bab El-Magana relied on a water-filled vessel and a floating weight attached to a series of pulleys and strings. As water drained at a regulated speed from the main tank, the sinking float pulled a string that moved a carriage behind the thirteen windows. Every hour, the carriage would trigger a door to open, allowing a small brass ball to roll out and fall into the corresponding bowl below. This action created a distinct ringing sound that echoed through the narrow streets of Fes El-Bali. The precision required for such a device in the 1300s suggests that Fes was a global leader in mechanical engineering during this period. Standing under the weathered beams today, you feel the age of the city more acutely than inside the polished madrasa across the street.
The clock ceased to function several centuries ago, and the exact details of its internal gear system remain a subject of intense debate among historians and horologists. In 2004, a significant restoration effort led to the temporary removal of the remaining bowls to prevent further deterioration and to allow for a reconstruction of the mechanism. Experts from various international heritage organizations have attempted to build a working model, yet the original fluidity of the 1357 design proves difficult to replicate perfectly without the original hidden water pipes. Because the site is part of the public street, there is no entrance fee, making it one of the most accessible historical artifacts in Morocco. I suggest visiting in the early morning around 8:00 AM before the nearby shops open their stalls, as this allows you to view the upper masonry without the distraction of heavy pedestrian traffic.
The clock is situated on the Rue Talaa Kebira in the Fes El-Bali medina, specifically positioned directly across the street from the entrance of the Bou Inania Madrasa. It is easily recognized by the 13 horizontal wooden beams protruding from the upper story of the building facade.
No, the clock is currently non-functional and has been silent for hundreds of years. While the external facade and wooden supports are visible from the street, the internal hydraulic mechanism is either missing or undergoing study following the 2004 restoration project.
There is no cost to view the clock because it is part of an external building facade on a public street. However, the Bou Inania Madrasa across the road typically charges an entry fee of approximately 20 MAD if you wish to see the adjacent religious complex.
The name translates from Arabic as Gate of the Clock or House of the Clock. This refers to its function as a public timepiece and its location near one of the major thoroughfares that leads toward the heart of the ancient city.
Mar Bastidas The entrance to the Jewish quarter, very different from the old area of Fez, is a little abandoned, but it is worth visiting, from the moment you cross it it is as if you were in another country, because of how different the buildings are, it is advisable to take a walk for its market. You will surely find more bargains than in the souks of the Medina.
Vincent Cerver In the Mellah (the neighborhood dedicated for the jews in Morocco). There are lots of shops selling gold and jewelry, jewish houses and synagogues. A must-go
Abderrahim Saidi The Bab El-Magana door leads into the old mellah of Fez: this is where the old "palace" of the rabbi of the Danan synagogue is located. We walk through a popular district: moreover, by visiting the synagogue, going up to the terrace from where we discover the Jewish cemetery, we realize the crampedness and discomfort of the accommodation currently occupied in this former mellah .
sara el bohtouri Bustling part of Fes, full of life and character. Some really cheap places to eat around here too,
simren khan Nice