Akershus Fortress is Oslo's medieval stronghold, begun in the late 13th century and later rebuilt as a Renaissance castle and military complex. It guarded the harbour, served as a royal residence during the Dano-Norwegian period, and still gives the city centre a hard stone edge above the fjord.
The grounds are open to wander and give fine views over Aker Brygge, the harbour, and central Oslo. The castle interiors and military museums add useful context if you want more than the ramparts and views.