 When his grandfather Valdemar IV of Denmark died, Olaf was just five years old.He was proclaimed king of Denmark by a Danehof in Slagelse the following year.His mother, Queen Margaret, was to serve as regent due to his young age.