In the 19th century, the Icelandic independence movement from Denmark was gaining momentum, while nationalism and demands for increased civil rights intensified in mainland Europe. In June 1849, the king of Denmark was forced to meet the demands of the liberals and the nationalists, and agree to a constitution for Denmark and thus also with Iceland. This constitution repealed the absolute monarchy and established a constitutional monarchy in which power over most important issues was handed over to a parliament elected by the people.