Oslo is the capital and most populous city of Norway. It constitutes both a county and a municipality. Founded in the year 1040 as Ánslo, and established as a kaupstad or trading place in 1048 by Harald Hardrada, the city was elevated to a bishopric in 1070 and a capital under Haakon V of Norway around 1300. Personal unions with Denmark from 1397 to 1523 and again from 1536 to 1814 reduced its influence. After being destroyed by a fire in 1624, during the reign of King Christian IV, a new city was built closer to Akershus Fortress and named Christiania in the king’s honour. It was established as a municipality (formannskapsdistrikt) on 1 January 1838. The city functioned as a co-official capital during the 1814 to 1905 Union between Sweden and Norway. In 1877, the city’s name was respelled Kristiania in accordance with an offical spelling reform – a change that was taken over by the municipal authorities only in 1897. In 1925 the city, after incorporating the village retaining its former name, was renamed Oslo.