The first germs of democratic evolution appeared in matters of law. The ancient regional assemblies - Frostating, Gulating and Eidsivating - were eventually joined into a single jurisdiction, and King Magnus Lagabøte had the existing body of law put into writing (1263 - 1280). This compilation of codified law which applied throughout the realm was exceptional for its time, and remained in force until Frederik III, king of the Danish-Norwegian union, promulgated absolute monarchy in 1660. This was codified in the King Act of 1665 which functioned as the constitution of the Union of Denmark-Norway until 1814.