Al-Mahdi also built an impressive shipyard which soon enabled the Fatimids to create a powerful fleet. The Fatimid set up ship-building factory, and yards were opened in Tunis. In 303/915, a big dock was constructed by digging out a hill on the coast of the Mediterranean, making a surface area of about 8250 square meters, so that 200 battle ships might be kept in reserve there. These ships were called shini and were so big that one of them required 143 oars to move it. It had a gate and a lock that could be closed.
To maintain the stability of the empire, connecting with different parts by sea-routes, the Fatimid gave due attention in the nautical progress. Yaqut (575-626/1179-1229) writes in "Mu'ajam al-Buldan" (comp. 625/1228) that, "The most renowned port of Maghrib was Mahdiya. Its dock was cut out of solid rock. It was a capacious dock, and could harbour thirty ships at once. On both sides of the port there lay big chains, which were opened when a ship came in." Makrizi (1363-1442) writes in his "al-Khitat" (3rd vol., p. 320) that the Fatimids were the first to start mock fights at sea in the world. The Fatimid admirals also developed the techniques of attacking ships with fire-throwers which the English employed five centuries later when they routed the Spanish Armada.