Above the village of Komenda stands a complex with a castle, a Baroque church, a parsonage, a cemetery and a fairly large stable. Komenda was a Roman post and later a Slavic settlement. Lower down by the road there is a benefice house as well, which houses Glavar's library. It is named after the owner and founder, a priest, economist and patron, Peter Pavel Glavar (Ljubljana, 2nd May 1721 - Lanšprež, Mirna, 24th January 1784), who had the greatest influence on the life of the church centre in Komenda in its history. The encampment walls were torn down in 1877.
The older church of St. Peter certainly stood in the same place in 1147. From 1223 until 1800 the complex was run by the Malta knights, the Ivanovci (Ivanovs). The old church was expanded in the 16th century. In 1726 the majority of the old walls were demolished and by 1729 a Baroque sanctuary had been built according to the plans of Gregor Maček. The barrel vaulted nave with two side chapels continues into a presbytery with a three-sided ending, and a small curved wall continues from the nave into the altar area. Among the fittings, the Baroque altar paintings by Nicolo Bambini (1721) stand out. The main altar was designed in 1758 by the carver Janez Gabrič according to the plans of the painter Frančišek Jelovšek. The remains of his frescos were found during the last renovation of the bell tower. The same painter drew the concept of the pulpit, which was made by the carver Jakob Löhr.
The church of Komenda is completely Baroque architecture. Older elements stand inside the complex: a built in Roman tombstone with a dolphin and a Gothic lighthouse at the edge of the cemetery. Between the two wars the entire exterior, which is the square between the church and the vicarage with a monument to the fallen during World War I, was arranged by J. Plečnik. He set up a sign, covered by the old bell saying "Let us pray for common sense".
After the earthquake in 1895, the church was re-vaulted and repaired and the presbytery was enlarged. The altar was set up anew, and between 1983-1984 it was repaired again. Before his death, Plečnik designed a new tabernacle. His work was continued by Janez Valentinčič with the Baptism Chapel (Krstna kapela)(1959). At its place the entrance to the later designed Chapel of the Malta knights on the north side of the church was arranged (architect Hribernik).