Oslo is the capital and most populous city of Norway. It constitutes both a county and a municipality. As of 23 November 2020, the municipality of Oslo had a population of 697,549, while the population of the city's greater urban area was 1,019,513, as of 4 November 2019. The metropolitan area had an estimated population of 1.71 million.During the Viking Age the area was part of Viken. Oslo was founded as a city at the end of the Viking Age in the year 1040 under the name Á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 honour of the king. It became a municipality (formannskapsdistrikt) on 1 January 1838. The city functioned as the capital of Norway during the 1814–1905 union between Sweden and Norway. From 1877, the city's name was spelled Kristiania in government usage, a spelling that was adopted by the municipal authorities in 1897. In 1925, the city, after incorporating the village retaining its former name, was renamed Oslo. In 1948 Oslo merged with Aker, a municipality which surrounded the capital and which was 27 times larger, thus creating the modern, much larger Oslo municipality.
Oslo is the economic and governmental centre of Norway. The city is also a hub of Norwegian trade, banking, industry and shipping. It is an important centre for maritime industries and maritime trade in Europe. The city is home to many companies within the maritime sector, some of which are among the world's largest shipping companies, shipbrokers and maritime insurance brokers. Oslo is a pilot city of the Council of Europe and the European Commission intercultural cities programme.
Oslo is considered a global city and was ranked "Beta World City" in studies carried out by the Globalization and World Cities Study Group and Network in 2008. It was ranked number one in terms of quality of life among European large cities in the European Cities of the Future 2012 report by fDi magazine. A survey conducted by ECA International in 2011 placed Oslo as the second most expensive city in the world for living expenses after Tokyo. In 2013 Oslo tied with the Australian city of Melbourne as the fourth most expensive city in the world, according to the Economist Intelligence Unit (EIU)'s Worldwide Cost of Living study. Oslo was ranked as the 24th most liveable city in the world by Monocle magazine.Oslo's population was increasing at record rates during the early 2000s, making it the fastest growing major city in Europe at the time. This growth stems for the most part from international immigration and related high birth rates, but also from intra-national migration. By 2010 the immigrant population in the city was growing somewhat faster than the Norwegian population, and in the city proper this had become more than 25% of the total population if the children of immigrant parents are included.