Caliph Me'mun, son of Harun Reşid, was buried in the east side of the mosque in 833. The minaret in the current backyard of the mosque was built by the Mamluks in 1362-63. The present mosque was completed in 1541 by Ibrahim Bey, the son of Pirî Pasha, one of the Ramazanoğulları. The mosque, has influences from Seljuk, Memluk and Ottoman architecture.. There is a clock tower built in 1895 on the northeast corner of the mosque.