After the Peace of Zsitvatorok (1606) and the unfavourable result of the wars with Persia, Sultan Ahmed I decided to build a large mosque in Istanbul as recompense. This would be the first imperial mosque to be built in more than forty years. Whereas his predecessors had paid for their mosques with their war booty, Sultan Ahmed I had to withdraw the funds from the treasury, because he had not won any notable victories. This provoked the anger of the ulema, the Muslim legal scholars.
The mosque was to be built on the site of the palace of the Byzantine emperors, facing the Hagia Sophia (at that time the most venerated mosque in Istanbul) and the hippodrome, a site of great symbolic significance. Large parts of the southern side of the mosque rest on the foundation and vaults of the Great Palace. Several palaces had already built there, most notably the palace of Sokollu Mehmet Pa?a, so these first had to be bought at a considerable cost and pulled down. Large parts of the Sphendone (curved tribune with U-shaped structure of the hippodrome) were also removed to make room for the new mosque. Construction of the mosque started in August 1609 when the sultan himself came to break the first sod. It was his intention that this would become the first mosque of his empire. He appointed his royal architect Sedefhar Mehmet A?a, a pupil and senior assistant of the famous architect Mimar Sinan to be in charge of the construction. The organization of the work was described in meticulous detail in eight volumes, now found in the library of the Topkap? Palace. The opening ceremonies were held in 1617 (although the inscription on the gate of the mosque says 1616). The sultan could now pray in the royal box (hünkâr mahfil). The building was not yet finished in this last year of his reign, as the last accounts were signed by his successor Mustafa I. Known as the Blue Mosque, Sultan Ahmed Mosque is one of the most impressive monuments in the world.
The mosque was depicted on the reverse of the Turkish 500 lira banknotes of 1953-1976.