Akershus Fortress Akershus Fortress ( ) or Akershus Castle ( ) is a medieval castle that was built to protect Oslo , the capital of Norway . It has also been used as a prison . Construction . The first construction on the castle started around the late 1290s , by King Haakon V , replacing Tønsberg as one of the two most important Norwegian castles of the period ( the other being Båhus ) . It was constructed in response to the Norwegian nobleman , Earl Alv Erlingsson of Sarpsborg ’ s earlier attack on Oslo . Military usage . The fortress has successfully survived all sieges , primarily by Swedish forces , including those by forces led by Charles XII in 1716 . In the early 17th century , the fortress was modernized and remodeled under the reign of the active King Christian IV , and got the appearance of a renaissance castle . The fortress was first used in battle in 1308 , when it was besieged by the Swedish duke Eric of Södermanland , whose brother won the Swedish throne in 1309 . The immediate proximity of the sea was a key feature , for naval power was a vital military force as the majority of Norwegian commerce in that period was by sea . The fortress was strategically important for the capital , and therefore , Norway as well . Whoever controlled Akershus fortress ruled Norway . The fortress has never been successfully captured by a foreign enemy . It surrendered without combat to Nazi Germany in 1940 when the Norwegian government evacuated the capital in the face of the unprovoked German assault on Denmark and Norway ( see Operation Weserübung ) . During World War II , several people were executed here by the German occupiers . The fortress was liberated on 11 May 1945 , when it was handed over to Terje Rollem on behalf of the Norwegian resistance movement . After the war , eight Norwegian traitors who had been tried for war crimes and sentenced to death were also executed at the fortress . Among those executed were Vidkun Quisling and Siegfried Fehmer . Prison . Akershus has also been a prison , a section of it known as " The Slavery " ( ) as the prisoners could be rented out for work in the city . It has housed many rebels and criminals through Norwegian history . Particularly well - known people to have been imprisoned there include author Gjest Baardsen ( 1791 – 1849 ) , and the similarly idealized thief Ole Høiland . Also , many early Norwegian socialists ( supporters of Marcus Thrane , 1817 – 1890 ) also spent time in the cells of Akershus . Kautokeino rebellion prisoners . Following the 1852 Laestadian Sámi revolt in Guovdageaidnu , all men except the two leaders Aslak Hætta and Mons Somby ( who were beheaded in Alta ) ended up in Akershus Fortress – the women were imprisoned in Trondheim . Many of the rebels died after a few years in captivity . Among the survivors was Lars Hætta ( 18 years at the time of imprisonment ) , who during his stay was allowed time and means to write the first translation of the Bible into North Sámi . Current usage . After the main building has undergone restoration , it has been used for official events and dinners for dignitaries and foreign heads of state . Akershus fortress is still a military area , but is open to the public daily until 21 : 00 . In addition to the castle , the Norwegian Armed Forces Museum and Norway ' s Resistance Museum can be visited there . The Norwegian Ministry of Defence and Defence Staff Norway ( armed forces headquarters ) have a joint modern headquarters in the eastern part of Akershus Fortress . Norwegian Royalty have been buried in the Royal Mausoleum in the castle . They include King Sigurd I , King Haakon V , Queen Eufemia , King Haakon VII , Queen Maud , King Olav V and Crown Princess Märtha . Imitation . A portion of the fortress was replicated at the Norway pavilion at Epcot Center theme park in Orlando , Florida . Commanders of Akershus fortress . The year is that in which they first took command . External links .