Hagia Sophia, (Aya Sofya or Holy Wisdom) may just be the world’s most wonderful building.

Hagia Sophia, morning, March 2011 - wonderful, busy, but not wonderfully busy. Note snow on dome.
It goes without saying that at some point on your visit to Istanbul you simply have to pop in. Like many of the world’s great icons it pulls a mighty crowd, especially when the Turkish city’s Karakoy cruise terminal has a few big boats moored. In summer months it can seem like every single person on board is jostling for a moment of peace under the dome constructed in the reign of Justinian, and arguably never bettered.
I was lucky enough to make my third visit to this magnificent basilica, now a mosque, last weekend and have a few suggestions for how to make your stay here as magical as it should be.
1. Arrive early
Like so many unmissable places, arriving early is a great way to shake off the crowds and enjoy it when it first opens. On my recent trip I was the 10th person in the queue, but as those in front of me dawdled outside I was the second person in. As I passed through the Imperial Gate into the nave the sun was shining directly through the easternmost just below the dome, straight into my eyes. And there was no-one there except me and a few security guards and a marvellous moggy or two who clearly has delusions of grandeur.

Byzantine mog
2. Take a quick look all around then head upstairs
Crowds congregate around the altar and mihrab, and the circle of marble where Byzantine Emperor’s were crowned and most of all, around the mosaics. Explore in detail at your leisure, but if you’re in early take a quick look around the nave then head up through the labyrinth to the galleries, where most of the mosaics are.
3. Have John Freely in your pocket
Strolling through Istanbul by John Freely and Hilary Sumner-Boyd is a crucial companion for your visit. It will guide you around the main sites of Hagia Sophia, give you details on the history of the building including its role in the Fall of Constantinople in 1453 and take you to some lesser-known features of the place, including a hard-to-find graffito of a medieval galleon which can form a fun treasure hunt for kids. It’s great for the whole city, too.
4. Look around outside
Lots of people park their bottoms on some of the stones outside the narthex (porch) that you enter the building by to rest a while before or after a visit. Not all realise these are the remains of the original Hagia Sophia, built by Theodosius II and finished in 405. These make up a very ancient and very different building. Take a while to have a look at them, if large buttocks don’t get in the way.

If you see this then you've found Pammakaristos Church
5. See a few other churches
Hagia Sophia is not the only amazing Byzantine church in Istanbul. On a previous visit I had a wonderful visit with my family to Little Hagia Sophia a few minutes walk away. Hagia Eirene is also easy to visit, in the grounds of the Topkapi Palace, and its radically austere decoration comes as quite a contrast. If it’s open, don’t miss it. Best of all are two harder to reach and less visited Byzantine wonders, the Church of St Saviour in Chora (ask a taxi driver to go to Kariye Müzesi) and the Church of Theotokos Pammakaristos (known as Fethiye Mosque and a fun walk from the Fatih Mosque, another must-visit). Both have breathtaking mosaics that are more complete than at Hagia Sophia and give some idea of the richness of old Constantinople, and how this richness was expressed in incredibly ornate and beautiful church decorations. You’ll also head well off the tourist trail into less-well-visited, more traditional areas of the city.

Hagia Eirene's sombre decor - or Andrew Eldritch's front room
Lastly, if you can’t do any of these things, still go, whenever you can. Hagia Sophia is enormous and has room for everyone. Spend a while admiring the marble columns and the northern balcony of the gallery and you’ll leave the crowds behind, and probably get the special, private moments that this sacred space offers to so many.