The Tuba Shahi Mosque is a 15th-century religious building standing near the Quadrangular Fortress in the centre of Mardakan. Built in 1481 in the Shirvan-Absheron style, it is now abandoned and no longer in use as a mosque, but survives in reasonable condition as a protected architectural monument.
The interior, accessible when the building is open, features a central dome supported by four stone pillars, with four corner rooms each finished with a different ceiling treatment — one with an ogival arch, one domed, one with a star-shaped vault. The exterior stonework shows the geometric window patterns typical of the Shirvan school. An earlier mosque occupied this site from 1372; the inscription above the entrance references both buildings.