The cathedral was built during several periods of construction and reconstruction, reaching its final shape in the 16th century. During the wars of the second half of the 16th century the building was neglected and started to decay. A fire in 1624 quickened the process. The cathedral was partly restored in 1804-1807 after the reopening of the university in 1802, according to the plans of the first university architect Professor Johann Wilhelm Krause to house the university library. In 1927-1928 the library was extended and in 1962-1964 the wooden constructions of the first floor were replaced by concrete inserted ceiling. New restoration work was started in 1985 and gave the building its present-day look.