Oslo (Christiania) is the capital and the most populous city in Norway. Oslo constitutes both a county and a municipality. Founded in the year 1040, and established as a "kaupstad" or trading place in 1048 by King Harald III, the city was elevated to a bishopric in 1070 and a capital under Haakon V around 1300. Personal unions with Denmark from 1397 to 1523 and again from 1536 to 1814 and with Sweden from 1814 to 1905 reduced its influence. After being destroyed by a fire in 1624, the city was moved closer to Akershus Fortress during the reign of King Christian IV and renamed Christiania in his honour. It was established as a municipality (formannskapsdistrikt) on 1 January 1838. Following a spelling reform, it was known as Kristiania from 1877 to 1925, when its original Norwegian name was restored.
Oslo was destroyed several times by fire, and after the fourteenth calamity, in 1624, King Christian IV of Denmark and Norway ordered it rebuilt at a new site across the bay, near Akershus Castle and given the name Christiania. Long before this, Christiania had started to establish its stature as a centre of commerce and culture in Norway. The part of the city built starting in 1624 is now often called Kvadraturen because of its orthogonal layout. The last plague outbreak in Oslo occurred in 1654. In 1814 Christiania once more became a real capital when the union with Denmark was dissolved.
Many landmarks were built in the 19th century, including the Royal Palace (1825–1848), Stortinget (the Parliament) (1861–1866), the University, Nationaltheatret and the Stock Exchange. Among the world-famous artists who lived here during this period were Henrik Ibsen and Knut Hamsun (the latter was awarded the Nobel Prize for literature). In 1850, Christiania also overtook Bergen and became the most populous city in the country. In 1877 the city was renamed Kristiania. The original name of Oslo was restored in 1925.
In the 19th century, several state institutions were established and the city's role as a capital intensified. Christiania expanded its industry from 1840, most importantly around Akerselva. The expansion prompted the authorities to construct several important buildings, most of which remain as tourist attractions. There was a brief building boom from 1880, with many new houses, but the boom collapsed in 1889.