Dar al-Magana (Arabic for "clockhouse") is a house in Fes, Morocco, built by the Marinid Sultan Abu Inan Faris which holds a weight-powered water clock. The muwaqqit Abou al-Hassan Ibn Ali Ahmed Tlemsani was responsible for building the clock, which was finished on 6 May 1357. The Dar al-Magana is opposite the Bou Inania Madrasa and connected to this school.
The clock consists of 13 windows and platforms carrying brass bowls. The motion of the clock was presumably maintained by a kind of small cart which ran from left to right behind the twelve doors. At one end, the cart was attached to a rope with a hanging weight; at the other end to a rope with a weight that floated on the surface of a water reservoir that was drained at a regular pace. Each hour one of the doors opened; at the same time a metal ball was dropped into one of the twelve brass bowls. The rafters sticking out of the building above the doors (identical to the rafters of the Bou Inania Madrasa) supported a small roof to shield the doors and bowls.
The bowls have been removed since 2004 and the clock mechanism  is presently being reconstructed by ADER, a foundation for the reconstruction of monuments in Fes.
- a muwaqqit is the officer charged with the regulation and maintenance of the clocks and with communicating the correct times of prayer to the muezzin. (Renaud, H. P.-J. "Astronomie et Astrologie marocaine", in: Hesperis XXIX, 1942 pp. 41 -63)
- In 1308 Abou al Hassan Ali ibn Ahmed had built (together with Ibn al Fahham) the Tlemcen water clock with its automata and astronomical indication.  (third section, retrieved 20 November 2008)
- Tazi, Rajae, "L’horloge Hydraulique Bouanania, une énigme enfin perçue par des spécialistes du patrimoine" in Jeunes Du Maroc, Portail des Jeunes, December 16, 2004
- Its mechanism is presumed to be similar to that of the Clock of Ridwan al-Saati of the Umayyad Mosque in Damascus, the Andalusian water clocks (a.o. in Toledo, described by Ibn Khalaf al-Muradi, reconstructed by the Museo Nacional de la Ciencia y la Tecnologia in Madrid in 1995) and the water clock described by Al-Jazari which was reconstructed by the London Science Museum in 1976  and still on display at the Nationaal Beiaard en Natuurmuseum in Asten, Netherlands (see under Beiaardcollectie, Astronomische kunstuurwerken).
- Ricard P. 1924. "L'Horloge de la Médersa Bou-Anania de Fès" in: Bulletin de la Société de Géographie d'Alger et de l'Afrique du Nord, vol. 25: pp. 248–254.
- D.J. de Solla Price, "Mechanical Waterclocks of the 14th Century in Fez, Morocco" in: Proceedings of the Tenth International Congress of the History of Science (Ithaca, N.Y, 1962). Paris: Hermann, pp. 599–602.
- Tazi, Rajae, "L’horloge Hydraulique Bouanania, une énigme enfin perçue par des spécialistes du patrimoine" in Jeunes Du Maroc, Portail des Jeunes, December 16, 2004 
- Tazi, Abdelhadi 1981-85. "L'horloge hydraulique." In: Le mémorial du Maroc. Rabat: Editions Nord, vol. 3, pp. 53–71.
- Hill, D.R. 1976. On the Construction of Water Clocks. Kitāb Arshimīdas fī ‘amal al-binkāmāt. London: Turner & Devereaux.
- Hill, D.R. 1981. Arabic Water-Clocks. Aleppo: Institute for the History of Arabic Science.
- Picture of the water clock  (click to enlarge - retrieved 24 nov. 2008) The rafters on the top level supported a roof. The lower beams held brass bowls. To signal the hours metals balls were released to fall into the bowls.
- Historical photos of Dar al-Magana on Marocantan.com  , Dafina.net  and Flickr  with bowls still in place (retrieved November 16, 2008)
- Picture of the restoration of the clock house (at ADER's site, click, left of the bottom left picture, on 'monuments de Fes' and: 'La médersa Bouinaniya')  (retrieved November 15, 2008) ADER promises that the clock will be functioning again after the restoration.
- Gaza clepsydra with automata. Replica by Diels. (click to zoom)  (retrieved 20 November 2008) Dominique Fléchon, Islam and the measurement of time, second footnote: "The water clock at Fez was very probably made to the same Iranian method."