At the end of the Great Northern War King Frederick IV asked architect Johan Cornelius Krieger, royal gardener to the court at Rosenborg Castle, to build him a small pleasure palace on the site of a farmyard named Østrup. Krieger built the French-inspired baroque palace 1720–1726, and the King himself took an active part in the planning of the building and grounds, and followed construction closely. The man responsible for the actual construction was General Building Master Johan Conrad Ernst, who was also responsible for the construction of Frederiksberg Palace.