also on the castle hill, the matthias church is a gothic church with a great historical past. it was originally built in romanesque style in 1015, but was destroyed during the mongol invasion in 1241. the current building was built in the 14th century and underwent a thorough reconstruction in the late 19th century. after the occupation of buda, the church was transformed into a mosque, during which the late gothic frescoes inside the church were destroyed. after the liberation of buda, according to the plans of frigyes schulek, it was restored to its second, gothic state. during the second world war, it was used as a camp by the germans and the soviets during the siege of budapest.