St. Sophia's Church was built in Dvigrad, on the ruins of two earlier castles, of which the remains of only one, Moncastelo, are visible today.
St. Sophia's Church is perched on the main elevation of Dvigrad, on its main square, dominating the city ruins. During its systematic explorations, which started in the 1950s, it was found that the church was built in several phases, of which the first dates back to the 5th c. These oldest remains are the worst preserved. The first church is an Old Christian structure with a single nave and the inscribed axis, which fragment has been preserved. During the later construction phase, it was turned into a three-nave hall church with three axes.
In the 9th or the 10th cc., the baptistery and the tower were added, as well as the chapel in the Early Romanesque period. The present day appearance of St. Sophia stems from the Romanesque period, probably the 13th century, despite the opinions of it being earlier, during the 11th or the 12th cc. The monumental structure has a rectangular layout, a straight back with axes, semi-circular in layout, of which the central one is higher and bigger. The church was significantly expanded and elongated during this period. Despite the central nave of the three-nave basilica being slightly narrower than the earlier Pre-Romanesque church, it is twice as wide as the lateral ones. The naves are separated by five square columns. The church had a ciborium as well, decorated with herbal, geometrical and figurative motifs.
Light entered through 12 tall, semi-circular windows on the elevated central nave walls, and through the facade window openings. The church interior was decorated by frescoes, and the exterior by shallow niches. The church repertoire also included a six-sided pulpit, which was later moved to the Church of St. Sylvester in Kanfanar, along with numerous other stone fragments and frescoes as parts of museum collections.