Known in Turkish as the Sultan Ahmet Camii ( Mosque of Sultan Ahmet ) , it was built between 1609 and 1616 for the Sultan Ahmet I , after which it became the city 's principal imperial mosque because of its proximity to the sultan 's palace at Topkape .
The mosque was built in the 13th century