Kraków was the residence of Polish kings until 1609. In that year Polish king Sigismund III Vasa (also king of Sweden 1592-1599) finally moved the royal court from Wawel Castle to the newly built castle in Warsaw. However Kraków remained formally the Capital of Poland until 1795. Kraków is also renowned for its Jagiellonian University founded in 1364 as the second university in Middle Europe.