The Medieval capital of the Bagratid kingdom of Armenia, Ani, also hosted many palaces. The first palace of Ani, constructed by the princely Armenian Kamsarakan dynasty in the seventh century, served as the most important structure of the city. Located in the main citadel, the Kamsarakan palace was used by the successive Bagratid kingdom as their headquarters. In addition, Ani hosted several other palaces such as the Merchant’s(Tigran Honents) Palace, one of the best surviving examples of secular Armenian architecture of that time, the Seljuk palace, and the Manuchir Mosque, which is said by some historians to have been a residence of Bagratid kings before being converted to a mosque.