The Makina was commissioned by the 'Alawid Sultan Moulay el-Hassan as a weapons manufacturing facility in 1885. It is often interpreted as one of the first signs of modern industrialization in Fez, and was part of the Sultan's plan to modernize his army.The Makina was built on the western façade of the Bab Dkaken and incorporated a 13th century aqueduct into one of its walls. It housed facilities for metalworking and woodworking, and was roofed with cross vaults.