The story of this building is inextricably tied to the life of Romano Lakapenos, son of Armenian peasants whose father was an imperial guardsman. His biography is, as expected, tortuously long and convoluted, so suffice it to say that Lakapenos distinguished himself as a militarily and politically savvy individual who became the trusted friend, and then father-in-law, of the young Constantine VII Porphyrogenitus. In A.D. 920, a year after the wedding of his daughter to the underaged emperor, Lakapenos was crowned co-emperor, and in later years bestowed the same honor upon his own sons Christopher, Stephen, and Constantine.
Around the time of his ascension to the throne, Lakapenos acquired a building, itself with a bit of history. Here we go again: The building once was an unfinished 5th-century-A.D. rotunda so huge that if completed would have been second in size only to the Pantheon in Rome. Later, it was surmounted -- with the help of a raised platform -- by a building reportedly used as a market and place of executions. When Lakapenos bought the building, he had it converted into a monastery and added the adjoining church, called the Myrelaion, or Place of Myrrh (finally, to the punch line). The oversize foundation of the church allowed it to sit at the same level as the palace. The church is built on a dome-in-cross plan, which makes it the first of all of the churches of the same type in Constantinople. When converted to a mosque, the Ottomans called it Bodrum Camii, or mosque with a cellar. The adjoining palace has been replaced by concrete blocks.