Just around the corner from Hagia Sophia, Topkapi Palace has a spectacular location high on the First Hill of the Byzantine city overlooking the confluence of the Golden Horn, the Sea of Marmara and the Bosporus.
This is where the Byzantine emperors had also chosen to site their palace (LINK), which reflects the Ottomans desire to be seen as stepping into the shoes of a line of rulers stretching back to the Romans. Despite its much later date, the high wall that surrounds the palace and stretches from Cankurtaran to Sirkeci looks very similar to the great Theodosian land walls that enclosed the Byzantine city (LINK); the area inside it corresponds very closely to what would have been the extent of the original Byzantium.
Parts of the palace gardens now form Gulhane Park (LINK), while parts are occupied by Istanbul Archaeology Museum (LINK). Some of the grounds were lost long ago to the railway line from Greece, leaving the pretty little Sepetciler Kasr (LINK) stranded on its own by the waterside.
As you approach the palace you should rid your mind of the idea of a single building usually evoked by the word. Instead the Ottomans, like the Byzantines before them, lived in a collection of relatively small buildings scattered about extensive gardens which were added to as and when the need arose. By the time the sultans abandoned it the Topkapi complex consisted of four courtyards, a set of gardens and terraces, and the labyrinthine harem. It continued in use until 1856 when Sultan Abdulmecid I chose to move across the Bosphorus and base himself in the brand-new Dolmabahce Palace (LINK).
His successors also preferred to live in Dolmabahce, Yildiz Palace (LINK), and a series of more minor palaces dotted around their estates. Just as the Old Palace at Beyazit (LINK) had become a retirement home for redundant palace women after the sultans took up residence in Topkapi, so Topkapi itself served a similar function after the sultans relocated across the Bosporus. It has been a museum since 1926.