The Ibn Tulun Mosque is the second oldest mosque in Cairo and was used as an administrative building in ancient times. It was named after the Abbasid viceroy of Egypt, Ahmed ibn Tulun, and originally bordered his palace. The Ibn Tulun Mosque was erected in 879 AD on a small hill on which, according to local legend, Noah's Ark stopped after the Flood.
The Ibn-Tulun Mosque was built in the style of the Grand Mosque in Samarra, Iraq. To this day, the mosque has preserved its appearance, which it had since the mid-19th century. The temple is a huge rectangular fortress, which is surrounded by a massive wall decorated with high crenellations. The mosque has a square courtyard with arched galleries on three sides, under which there are covered halls. The courtyard is paved with stone and in the middle of it there is a fountain for ablutions. An arched structure was later erected over the fountain. From the south, the courtyard passes into a hall for prayers. The minaret was designed in the form of a spiral, which is a peculiarity of this mosque. The walls of the mosque are made of burnt bricks and covered with plaster - this method of construction was uncharacteristic for Egypt at that time, it was borrowed from the masters from Baghdad.
The mosque has been rebuilt and restored several times. Its last renovation took place in 2004. In medieval times, several buildings were built near the walls of the temple, most of which were destroyed in the 30s of the 20th century. Two buildings remain, called "The House of the Chinese Woman" and "The House of Amna, daughter of Salim", which were later connected by a bridge at the level of the fourth floor.
Originally, this mosque was built as a temple for crowded prayers, which could accommodate all the inhabitants of the city for Friday service. According to legend, the plan of the mosque was designed by a Christian architect, who was released from the dungeon where he was imprisoned. However, the name of the architect has not been preserved.
The minaret of the mosque can be seen from the farthest corners of the city.

