Topkapı Palace was home to all the Ottoman sultans until the reign of Abdulmecid I (1839-1860), a period of nearly four centuries. Mehmed the 2nd, the twenty-three-year-old sultan of the Ottoman Empire, ordered the construction of the palace after he conquered Istanbul. The first palace was like a complex of buildings and annexes, including an outpost by the water known as the Topkapı shore palace. After the shore palace was burned down in 1863, it lent its name to the great complex we now know as Topkapı Palace.
From the end of the 17th century the Topkapı Palace gradually lost its importance as the Sultans preferred to spend more time in their new palaces along the Bosphorus. In 1856, Sultan Abdül Mecid I decided to move the court to the newly built Dolmabahçe Palace, the first European-style palace in the city.
Topkapı Palace was turned into a museum in 1924 and functions as a major tourist attraction today. It also contains important holy relics of the Muslim world, including the prophet Muhammed's cloak and sword, along with a display of Ottoman treasures and jewelry.