The mosque was built between 1609 and 1616 by order of the Sultan Ahmed I, after whom it is named. He is buried in the mosque's precincts.
The mosque was deliberately sited to face Hagia Sophia, to demonstrate that Ottoman and Islamic architects and builders could rival anything their Christian predecessors had created. The two buildings thus comprise a unique historical and architectural precinct.
The mosque became known in the west as the Blue Mosque because of the predominantly blue colouring of paintwork of the interior.
The Sultan Ahmed Mosque is the only mosque in Turkey that has six minarets. When the number of minarets was revealed, the Sultan was criticised for presumption, since this was, at the time, the same number as at the mosque of the Ka'aba in Mecca. He overcame this problem by paying for a seventh minaret at the Mecca mosque.
Each of the minarets has three balconies, and until recently the muezzin or prayer-caller had to climb a narrow spiral staircase five times a day to anounce the call to prayer. Today a public address system is used, and the call can be heard across the old part of the city, echoed by other mosques in the vicinity. Although Istanbul is the most secularised part of Turkey, large crowds of both Turks and tourists gather at sunset in the park facing the mosque to hear the call to evening prayers, as the sun sets and the mosque is brilliantly illuminated by coloured floodlights.