According to chronicler Jan Długosz, Saint Mary's Basilica in the Main Square in Kraków was founded in by the Bishop of Kraków, Iwo Odrowąż. The building was destroyed during the Mongol invasion of Poland. Between 1290–1300 the new early Gothic church was built on the remaining foundations. It was consecrated twenty years later, in 1320. The church was completely rebuilt during the reign of Casimir III the Great between 1355 and 1365 with substantial contributions from wealthy restaurateur Mikołaj Wierzynek. The presbytery was elongated and tall windows added. The main body of the church was completed in 1395–97 with the new vault constructed by master Nicholas Wernher from Prague. However, the vault over the presbytery collapsed in 1442 due to a possible earthquake, which has never happened before nor since in Kraków. In the first half of the 15th century, the side chapels were added. Most of them were the work of master Franciszek Wiechoń. At the same time the northern tower was raised and designed to serve as the watch tower for the entire city. In 1478 carpenter Maciej Heringh funded a helmet for the tower. A gilded crown was placed on it in 1666, which is still present today. At the end of the 15th century, Saint Mary's church was enriched with a sculptural masterpiece, an Altarpiece of Veit Stoss of late Gothic design. In 1536/37, King Sigismund I. declared that the sermons in the church should be changed from German to Polish. The large German community of Kraków were relocating their place of worship to the smaller Saint Barbara's church. In the 18th century, by the decision of vicar Jacek Augustyn Łopacki, the interior was rebuilt in the late Baroque style. The author of this work was Francesco Placidi. All 26 altars, equipment, furniture, benches and paintings were replaced and the walls were decorated with polychrome, the work of Andrzej Radwański. At the beginning of the 19th century, the city decided that a cemetery near the Basilica was to be shut down and replaced by a public square. Today, it is known as Plac Mariacki. In the years 1887–1891, under the direction of Tadeusz Stryjeński, the neo-Gothic design was introduced into the Basilica. The temple gained a new design and murals painted and funded by Jan Matejko, who worked with Stanislaw Wyspianski and Józef Mehoffer - the authors of stained glass in the presbytery. Since the beginning of 1990s, the Basillica underwent an extensive renovation. In 2003, in the final stage of the works, the roof of the church was replaced. On 18 April 2010, in Saint Mary's Basilica, a funeral ceremony for Polish President Lech Kaczyński and his wife Maria was held. The coffins were later transported and buried in one of the crypts of Wawel Cathedral.