During the Middle Ages, Oslo reached its heights in the reign of Haakon V of Norway. He started building Akershus Fortress and was also the first king to reside permanently in the city, which helped to make Oslo the capital of Norway.