Opposition to Magnus' rule in Norway led to a settlement between the king and the Norwegian nobility at Varberg on 15 August 1343. In violation of the Norwegian laws on royal inheritance, Magnus' younger son Haakon would become king of Norway, with Magnus as regent during his minority. Later the same year, it was declared that Magnus' older son, Eric would become king of Sweden on Magnus' death. Thus, the union between Norway and Sweden would be severed. This occurred when Haakon came of age in 1355.