Sahn-ı Seman Medrese or Semâniyye (meaning: eight courtyards) is a 15th-century Ottoman Medrese complex in Istanbul, Turkey, which was part of the Fatih Mosque. It was one of the highest educational facilities of various sciences such as theology, law, medicine, astronomy, physics and mathematics, and was founded by the Turk astronomer Ali Qushji who was invited by the Ottoman sultan Fatih Sultan Mehmed to his court in Istanbul.
The medrese complex consisting of eight large and eight smaller (tetimme) medrese were built by order of Mehmed II and completed in 1470. Till the construction of the medreses of the Suleymaniye complex (Külliye) the Sahn-ı Seman medreses were considered as the most prestigious schools in the Ottoman Empire. They were a very large Islamic theological complex, grander in scale and organisation then earlier Ottoman medreses, constructed in the newly conquered (1453) former Byzantine capital city of Constantinople which became the new Ottoman capital. The goal of the complex was to make the city a center of Islamic science.
The buildings are part of the symmetrical Fatih complex (300 by 300 metres (980 ft × 980 ft)) and each four of them are located at the northern and southern sides of the Fatih Mosque. Each medrese has a square plan with 19 student rooms and consist of a colonnaded courtyard surrounded by the student cells, each room is covered by a small dome and has a chimney, one large domed room was the "dershane" (classroom). Each medrese has next to it a smaller medrese consisting of eight student cells whose students received lower education, when they advanced they were given a room of the Sahn-ı Seman medrese. Each room was occupied by one or two students. At the eastern side of the complex there is a hospital (dârüşşifâ) and a lunatic asylum (tabhâne) who have a similar architecture as the medrese.