A nascent Danish liberal and national movement gained momentum in the 1830s; after the European Revolutions of 1848, Denmark peacefully became a constitutional monarchy on 5 June 1849. A new constitution established a two-chamber parliament. Denmark faced war against both Prussia and Austrian Empire in what became known as the Second Schleswig War, lasting from February to October 1864. Denmark was defeated and obliged to cede Schleswig and Holstein to Prussia. This loss came as the latest in the long series of defeats and territorial losses that had begun in the 17th century. After these events, Denmark pursued a policy of neutrality in Europe.