The Sultan Ahmed Mosque or Sultan Ahmet Mosque is a historic mosque in Istanbul, Turkey. The mosque is popularly known as the Blue Mosque for the blue tiles adorning the walls of its interior.
It was built from 1609 to 1616, during the rule of Ahmed I. Its Külliye contains a tomb of the founder, a madrasah and a hospice. The Sultan Ahmed Mosque is still popularly used as a mosque.
After the Peace of Zsitvatorok and the crushing loss in the 1603-1618 war with Persia, Sultan Ahmet I, decided to build a large mosque in Istanbul to reassert Ottoman power. It would be the first imperial mosque for more than forty years. While his predecessors had paid for their mosques with their spoil of war, Ahmet the First had to remove the funds of the Treasury, because he had not gained remarkable victories.
It caused the anger of the ulema, the Muslim jurists. The mosque was built on the site of the palace of the Byzantine emperors, in front of the basilica Ayasofya (at that time, the primary imperial mosque in Istanbul) and the hippodrome, a site of significant symbolic meaning as it dominated the city skyline from the south. Big parts of the south shore of the mosque rest on the foundations, the vaults of the old Grand Palace.
(source)