The Royal Castle in Warsaw (Polish: Zamek Królewski w Warszawie) is a royal palace and official residence of the Polish monarchs, located in the Plac Zamkowy in Warsaw, at the entrance to the Old Town. The personal offices of the king and the administrative offices of the Royal Court of Poland were located there from the 16th century until the Partitions of Poland. In its long history the Royal Castle was repeatedly devastated and plundered by Swedish, Brandenburgian, German, and Russian armies. The Constitution of May 3, 1791, Europe's first modern codified national constitution, as well as the second-oldest national constitution in the world, was drafted here by the Four-Year Sejm. In the 19th century, after the collapse of the November Uprising, it was used as an administrative center by the Tsar. Between 1926 and World War II the palace was the seat of the Polish president, Ignacy Mościcki. After the devastation of World War II it was rebuilt and reconstructed. Today it is a historical and national monument, and is listed as a national museum.