The cathedral's name comes from the Hagia Sophia cathedral in Constantinople. According to a less popular theory, its model was the 13-domed oaken Saint Sophia Cathedral in Novgorod, which Yaroslav I the Wise determined to imitate in stone as a sign of gratitude to the citizens of Novgorod who had helped him secure the Kievan throne in 1019.
The first foundations were laid in 1037 but the cathedral took two decades to complete. The structure has 5 naves, 5 apses, and (quite surprisingly for Byzantine architecture) 13 cupolas. It is surrounded by two-tier galleries from three sides. Measuring 37 by 55 meters, the exterior used to be faced with plinths. On the inside, it retains mosaics and frescos from the eleventh century, including a dilapidated representation of Yaroslav's family.
Originally the cathedral was a burial place of the Kievan rulers including Vladimir Monomakh, Vsevolod Yaroslavich and of course the cathedral's founder Yaroslav I the Wise, although only the latter's grave survived to our days (see picture).
After pillaging of Kiev by Andrei Bogolyubsky of Vladimir-Suzdal in 1169 followed by Mongolian Tatars in 1240 the cathedral fell into disrepair. Following the 1595-96 Union of Brest, the cathedral of Saint Sophia belonged to the Ukrainian Greek Catholic Church until it was claimed by the Ukrainian Orthodox metropolitan Peter Mogila (Mohyla) in 1633. Mogila commissioned the repair work and the upper part of the building was thoroughly rebuilt, modeled by the Italian architect Octaviano Mancini in the distinct Ukrainian Baroque style, while preserving the byzantine interior, keeping its splendor intact. The work continued under the Cossack Hetman Ivan Mazepa, and in 1740 the Cathedral was completed to its present form.