The Royal Castle witnessed many notable events in Poland's history; the Constitution of 3 May 1791, first of its type in Europe and the world's second-oldest codified national constitution, was drafted here by the Four-Year Parliament. The edifice was redesigned into a neoclassical style following the partitions of Poland. Under the Second Polish Republic (1918–1939), it was the seat of the Polish head of state and president.