The history of the royal palace in Warsaw dates back to the beginning of the 14th century when early wooden constructions were replaced by stone and brick buildings by the Masovian dukes. The next few generations enlarged the site and when King Sigismund III moved his court from Cracow to Warsaw, the building was turned into a magnificent palace. The Swedish advances into Poland and a big blaze in 1767 hit the building hard and during restoration work its outer appearance was changed several times as different styles came and went. During the Second World War, the palace was badly damaged in air raids and by fire and was blown up by the SS after the Warsaw Uprising in 1944. Soon after Warsaw’s liberation, work began on rebuilding the palace. Construction was completed in 1984. Restored to its former glory, the palace now houses a museum and is also used for state celebrations and events.