Norwegian fortresses or fortifications have been constructed from some of the earliest recorded periods, down through the 20th century. The geography and topography of glacially carved, mountainous Norway constrain both the sea and the land routes which an aggressor must follow. Natural strong-points, such as rock outcroppings at Halden, Tønsberg and Trondheim make excellent bases for fortification (i.e., natural fortresses).
Fortifications evolved to accommodate the offensive threat which they guard against. Early castles provided a strong defense against the attack of the day, and were normally taken by duplicity or siege. In the age of black powder, cannon allowed breaching of the fortress walls and subsequent taking by storm. As a result, fortresses changed form, now incorporating design features like the bastion, ravelin, and glacis to allow cannon within the fortress to be effective while protecting the walls and defenders from external attack. This evolution of technology continued into the 20th century as weaponry continued to evolve.
Most Norwegian fortresses were constructed in the period of intense competition among the Baltic powers (Denmark-Norway, Sweden, Russia, Poland and the German states) for northern supremacy. The 16th, 17th and beginning of the 18th Century was a period of virtually continuous war or preparation for war:
In 1600 Denmark controlled virtually all land bordering on the Skagerrak, Kattegat, Store Bælt and the restricted Sound (Øresund). The current Swedish provinces of Skåne and Halland were Danish and the province of Båhuslen was then Norwegian (as they had been for all recorded history). All powers interested in Baltic trade, or otherwise forced to pass through waters controlled by Denmark, had a strong interest in breaking Denmark's control and lifting the Sound Dues that Denmark levied for passage through the Øresund. Hence the naval trading powers, particularly Holland and England, contributed to the Northern unrest of the period.
And the larger political balance in Europe can not be forgotten. As one example, the danger of French domination under Louis XIV resulted in a 1668 triple alliance of England, Holland and Sweden. This alliance worked to Sweden's favor when treaties were negotiated.