Sweden nearly half its territory. This included Norwegian province of Trøndelag and Båhuslen, all remaining Danish provinces on the Swedish mainland, and the island of Bornholm. However, two years later, in 1660, there was a follow-up treaty, the Treaty of Copenhagen, which gave Trøndelag and Bornholm back to Denmark–Norway. Royal absolutist state In the aftermath of Sweden's final secession from the Kalmar Union in 1521, civil war and the Protestant Reformation followed in Denmark and in Norway. When things had settled down, the Rigsraad (High Council) of Denmark became weak, and it was abolished in 1660; the Norwegian Riksråd had already been abolished de facto (the Norwegian Riksråd was assembled for the last time in 1537). In 1537, king Christian III of Denmark–Norway staged a coup d'état in Norway and made it a hereditary kingdom in a real union with Denmark. Norway kept its separate laws and some institutions, such as a royal chancellor, and separate coinage and army. Norway also had its own royal standard flag until 1748, after that the Dannebrog became the only official merchant flag in the union. Denmark–Norway became an absolutist state and Denmark a hereditary monarchy, as Norway de jure had been since 1537. These changes were confirmed in the Leges regiae signed on 14 November 1665, stipulating that all power lay in the hands of the king, who was only responsible to God. Scanian War Denmark had lost its provinces in Scania after the Treaty of Roskilde and was always eager to retrieve them, but as Sweden had grown into a great power it would not be an easy task. However, Christian V saw an opportunity when Sweden got involved in the Franco-Dutch War, and after some hesitation Denmark–Norway invaded Sweden in 1675. Although the Danish-Norwegian assault began as a great success, the Swedes led by 19-year-old Charles XI counter-attacked and took back the land that was being occupied. The war was concluded with the French dictating peace, with no permanent gains or losses to either of the countries. Napoleonic Wars and end of the Union During the French Revolutionary Wars Denmark–Norway at first tried to stay neutral, so it could continue its trade with both France and the United Kingdom, but when it entered the League of Armed Neutrality, the British considered it a hostile action, and attacked Copenhagen in 1801 and again in 1807. In the 1807 attack on Copenhagen the